Skip to content

Commit

Permalink
fix application startup failure (505)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvindkrishnakumar-okta committed Feb 6, 2023
1 parent 5f5f323 commit 5375c85
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ private void configureResourceServerForOpaqueTokenValidation(HttpSecurity http,
// Spring (2.7.x+) configures JWT be default and this creates startup failure "Spring Security
// only supports JWTs or Opaque Tokens, not both at the same time" when we try to configure Opaque Token mode in following line.
// Therefore, we are unsetting JWT mode before attempting to configure Opaque Token mode for ROOT issuer case.
unsetJwtConfigurer(http.getConfigurer(OAuth2ResourceServerConfigurer.class));

if (http.getConfigurer(OAuth2ResourceServerConfigurer.class) != null) {
unsetJwtConfigurer(http.getConfigurer(OAuth2ResourceServerConfigurer.class));
}

http.oauth2ResourceServer().opaqueToken();
}
Expand Down

0 comments on commit 5375c85

Please sign in to comment.