Class OAuth2SessionAuthenticationProvider
- java.lang.Object
-
- com.broadleafcommerce.auth.user.session.OAuth2SessionAuthenticationProvider
-
- All Implemented Interfaces:
org.springframework.security.authentication.AuthenticationProvider
public class OAuth2SessionAuthenticationProvider extends Object implements org.springframework.security.authentication.AuthenticationProvider
AnAuthenticationProvider
that authenticates a user using aOAuth2SessionAuthenticationToken
.- Author:
- Nick Crum (ncrum)
- See Also:
OAuth2SessionAuthenticationFilter
-
-
Constructor Summary
Constructors Constructor Description OAuth2SessionAuthenticationProvider(OAuth2UserDetailsService userDetailsService, StatelessUtil util)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.security.core.Authentication
authenticate(org.springframework.security.core.Authentication authentication)
protected org.springframework.security.core.Authentication
createSuccessAuthentication(OAuth2UserDetails user, OAuth2SessionToken sessionToken)
protected Collection<org.springframework.security.core.GrantedAuthority>
getAuthorities(OAuth2UserDetails user, OAuth2SessionToken sessionToken)
boolean
supports(Class<?> authentication)
protected void
validateJWT(com.nimbusds.jwt.SignedJWT jwt)
protected void
validateUserDetails(OAuth2UserDetails userDetails, String clientId, OAuth2SessionToken sessionToken)
-
-
-
Constructor Detail
-
OAuth2SessionAuthenticationProvider
public OAuth2SessionAuthenticationProvider(OAuth2UserDetailsService userDetailsService, StatelessUtil util)
-
-
Method Detail
-
supports
public boolean supports(Class<?> authentication)
- Specified by:
supports
in interfaceorg.springframework.security.authentication.AuthenticationProvider
-
authenticate
public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication)
- Specified by:
authenticate
in interfaceorg.springframework.security.authentication.AuthenticationProvider
-
createSuccessAuthentication
protected org.springframework.security.core.Authentication createSuccessAuthentication(OAuth2UserDetails user, OAuth2SessionToken sessionToken)
-
getAuthorities
protected Collection<org.springframework.security.core.GrantedAuthority> getAuthorities(OAuth2UserDetails user, OAuth2SessionToken sessionToken)
-
validateJWT
protected void validateJWT(com.nimbusds.jwt.SignedJWT jwt) throws ParseException
- Throws:
ParseException
-
validateUserDetails
protected void validateUserDetails(OAuth2UserDetails userDetails, String clientId, OAuth2SessionToken sessionToken)
-
-