57 if (!
supports(authentication.getClass())) {
61 if (authentication instanceof PendingOIDCAuthenticationToken) {
63 PendingOIDCAuthenticationToken token = (PendingOIDCAuthenticationToken) authentication;
66 JWT idToken = token.getIdToken();
71 if (userInfo == null) {
75 if (!Strings.isNullOrEmpty(userInfo.getSub()) && !userInfo.getSub().equals(token.getSub())) {
77 throw new UsernameNotFoundException(
"user_id mismatch between id_token and user_info call: " + token.getSub() +
" / " + userInfo.getSub());
boolean supports(Class<?> authentication)
Definition: OIDCAuthenticationProvider.java:125
OIDCAuthoritiesMapper authoritiesMapper
Definition: OIDCAuthenticationProvider.java:46
Authentication createAuthenticationToken(PendingOIDCAuthenticationToken token, Collection<? extends GrantedAuthority > authorities, UserInfo userInfo)
Definition: OIDCAuthenticationProvider.java:96
UserInfo loadUserInfo(final PendingOIDCAuthenticationToken token)
Definition: UserInfoFetcher.java:76
UserInfoFetcher userInfoFetcher
Definition: OIDCAuthenticationProvider.java:44
Collection<? extends GrantedAuthority > mapAuthorities(JWT idToken, UserInfo userInfo)