Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
| web:framework:spring:jwt [2025/03/14 08:32] – [Installation] jcheron | web:framework:spring:jwt [2025/08/12 02:35] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 105: | Ligne 105: | ||
| val source = UrlBasedCorsConfigurationSource() | val source = UrlBasedCorsConfigurationSource() | ||
| val config = CorsConfiguration() | val config = CorsConfiguration() | ||
| - | | + | config.allowedOrigins = allowedOrigins.split("," |
| - | | + | config.allowedMethods = listOf(" |
| - | config.allowedMethods = listOf(" | + | config.allowedHeaders = listOf(" |
| - | config.allowedHeaders = listOf(" | + | config.allowCredentials = true |
| - | config.allowCredentials = true | + | source.registerCorsConfiguration("/ |
| - | source.registerCorsConfiguration("/ | + | |
| - | } | + | |
| return source | return source | ||
| } | } | ||
| Ligne 123: | Ligne 121: | ||
| </ | </ | ||
| + | ===== RSA config ===== | ||
| + | <sxh kotlin> | ||
| + | @ConfigurationProperties(prefix = " | ||
| + | @JvmRecord | ||
| + | data class RsaKeyConfigProperties(val publicKey: RSAPublicKey, | ||
| + | </ | ||
| + | |||
| + | ==== Génération des clés RSA ==== | ||
| + | Avec git bash : | ||
| + | <sxh bash; | ||
| + | genpkey -algorithm RSA -out private.pem -pkeyopt rsa_keygen_bits: | ||
| + | </ | ||
| + | |||
| + | <sxh bash; | ||
| + | openssl rsa -in private.pem -pubout -out public.pem | ||
| + | </ | ||
| ==== AuthUser ==== | ==== AuthUser ==== | ||
| <sxh kotlin> | <sxh kotlin> | ||