Skip to content

Commit 3b66027

Browse files
committed
Add Decoder
1 parent 283ea76 commit 3b66027

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/main/java/net/coderic/core/api/config/SecurityConfiguration.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,8 @@ private JwtAuthenticationConverter jwtAuthenticationConverter() {
134134
}
135135
@Bean
136136
public JwtDecoder jwtDecoder() {
137-
// Clave simétrica utilizada para descifrar el token (debe coincidir con la configurada en Auth0)
138-
String secretKey = System.getenv("OKTA_CLIENT_SECRET"); // Sustituye con la clave proporcionada por Auth0
139-
140-
return NimbusJwtDecoder.withSecretKey(new SecretKeySpec(secretKey.getBytes(), "AES")).build();
137+
// URI del JWKS de Auth0
138+
String jwkSetUri = "https://auth.coderic.org/.well-known/jwks.json";
139+
return NimbusJwtDecoder.withJwkSetUri(jwkSetUri).build();
141140
}
142141
}

0 commit comments

Comments
 (0)