You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deal with list of issuers in JwtAuthenticationProvider (#30)
* Deal with list of issuers in JwtAuthenticationProvider
* Added hint for several issuers feature in README.md
Co-authored-by: Sebastian Heupts <sebastian.heupts@iese.fraunhofer.de>
Co-authored-by: Jim Anderson <jim.anderson@auth0.com>
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
64
64
65
65
> If you need further customization (like a leeway for JWT verification) use the `JwtWebSecurityConfigurer` signatures which accept a `JwtAuthenticationProvider`.
66
66
67
+
> If you need to configure several allowed issuers use the `JwtWebSecurityConfigurer` signatures which accept a `String[] issuers`.
68
+
67
69
68
70
Then using Spring Security `HttpSecurity` you can specify which paths requires authentication:
* Configures application authorization for JWT signed with RS256
68
+
* Will try to validate the token using the public key downloaded from "$issuer/.well-known/jwks.json"
69
+
* and matched by the value of {@code kid} of the JWT header
70
+
* @param audience identifier of the API and must match the {@code aud} value in the token
71
+
* @param issuers array of allowed issuers of the token for this API and one of the entries must match the {@code iss} value in the token
72
+
* @param provider of Spring Authentication objects that can validate a {@link com.auth0.spring.security.api.authentication.PreAuthenticatedAuthenticationJsonWebToken}
73
+
* @return JwtWebSecurityConfigurer for further configuration
* Configures application authorization for JWT signed with HS256
143
+
* @param audience identifier of the API and must match the {@code aud} value in the token
144
+
* @param issuers list of allowed issuers of the token for this API and one of the entries must match the {@code iss} value in the token
145
+
* @param provider of Spring Authentication objects that can validate a {@link com.auth0.spring.security.api.authentication.PreAuthenticatedAuthenticationJsonWebToken}
146
+
* @return JwtWebSecurityConfigurer for further configuration
0 commit comments