Class AbstractAuthenticationProvider
java.lang.Object
cn.herodotus.engine.oauth2.authentication.provider.AbstractAuthenticationProvider
- All Implemented Interfaces:
org.springframework.security.authentication.AuthenticationProvider
- Direct Known Subclasses:
AbstractUserDetailsAuthenticationProvider,OAuth2AuthorizationCodeAuthenticationProvider,OAuth2ClientCredentialsAuthenticationProvider
public abstract class AbstractAuthenticationProvider
extends Object
implements org.springframework.security.authentication.AuthenticationProvider
Description: 抽象的认证Provider
提取公共的通用认证基类,方便设置返回Token的信息设置
- Author:
- : gengwei.zheng
- Date:
- : 2022/10/14 12:46
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.security.oauth2.core.OAuth2AccessTokencreateOAuth2AccessToken(org.springframework.security.oauth2.server.authorization.token.DefaultOAuth2TokenContext.Builder tokenContextBuilder, org.springframework.security.oauth2.server.authorization.OAuth2Authorization.Builder authorizationBuilder, org.springframework.security.oauth2.server.authorization.token.OAuth2TokenGenerator<? extends org.springframework.security.oauth2.core.OAuth2Token> tokenGenerator, String errorUri) protected org.springframework.security.oauth2.server.authorization.authentication.OAuth2AccessTokenAuthenticationTokencreateOAuth2AccessTokenAuthenticationToken(org.springframework.security.core.Authentication source, org.springframework.security.oauth2.server.authorization.authentication.OAuth2AccessTokenAuthenticationToken destination) protected org.springframework.security.oauth2.core.oidc.OidcIdTokencreateOidcIdToken(org.springframework.security.core.Authentication principal, org.springframework.security.core.session.SessionRegistry sessionRegistry, org.springframework.security.oauth2.server.authorization.token.DefaultOAuth2TokenContext.Builder tokenContextBuilder, org.springframework.security.oauth2.server.authorization.OAuth2Authorization.Builder authorizationBuilder, org.springframework.security.oauth2.server.authorization.token.OAuth2TokenGenerator<? extends org.springframework.security.oauth2.core.OAuth2Token> tokenGenerator, String errorUri, Set<String> requestedScopes) protected org.springframework.security.oauth2.core.OAuth2RefreshTokencreatOAuth2RefreshToken(org.springframework.security.oauth2.server.authorization.token.DefaultOAuth2TokenContext.Builder tokenContextBuilder, org.springframework.security.oauth2.server.authorization.OAuth2Authorization.Builder authorizationBuilder, org.springframework.security.oauth2.server.authorization.token.OAuth2TokenGenerator<? extends org.springframework.security.oauth2.core.OAuth2Token> tokenGenerator, String errorUri, org.springframework.security.oauth2.server.authorization.authentication.OAuth2ClientAuthenticationToken clientPrincipal, org.springframework.security.oauth2.server.authorization.client.RegisteredClient registeredClient) idTokenAdditionalParameters(org.springframework.security.oauth2.core.oidc.OidcIdToken idToken) validateScopes(Set<String> requestedScopes, org.springframework.security.oauth2.server.authorization.client.RegisteredClient registeredClient) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.security.authentication.AuthenticationProvider
authenticate, supports
-
Constructor Details
-
AbstractAuthenticationProvider
public AbstractAuthenticationProvider()
-
-
Method Details
-
createOAuth2AccessToken
protected org.springframework.security.oauth2.core.OAuth2AccessToken createOAuth2AccessToken(org.springframework.security.oauth2.server.authorization.token.DefaultOAuth2TokenContext.Builder tokenContextBuilder, org.springframework.security.oauth2.server.authorization.OAuth2Authorization.Builder authorizationBuilder, org.springframework.security.oauth2.server.authorization.token.OAuth2TokenGenerator<? extends org.springframework.security.oauth2.core.OAuth2Token> tokenGenerator, String errorUri) -
creatOAuth2RefreshToken
protected org.springframework.security.oauth2.core.OAuth2RefreshToken creatOAuth2RefreshToken(org.springframework.security.oauth2.server.authorization.token.DefaultOAuth2TokenContext.Builder tokenContextBuilder, org.springframework.security.oauth2.server.authorization.OAuth2Authorization.Builder authorizationBuilder, org.springframework.security.oauth2.server.authorization.token.OAuth2TokenGenerator<? extends org.springframework.security.oauth2.core.OAuth2Token> tokenGenerator, String errorUri, org.springframework.security.oauth2.server.authorization.authentication.OAuth2ClientAuthenticationToken clientPrincipal, org.springframework.security.oauth2.server.authorization.client.RegisteredClient registeredClient) -
createOidcIdToken
protected org.springframework.security.oauth2.core.oidc.OidcIdToken createOidcIdToken(org.springframework.security.core.Authentication principal, org.springframework.security.core.session.SessionRegistry sessionRegistry, org.springframework.security.oauth2.server.authorization.token.DefaultOAuth2TokenContext.Builder tokenContextBuilder, org.springframework.security.oauth2.server.authorization.OAuth2Authorization.Builder authorizationBuilder, org.springframework.security.oauth2.server.authorization.token.OAuth2TokenGenerator<? extends org.springframework.security.oauth2.core.OAuth2Token> tokenGenerator, String errorUri, Set<String> requestedScopes) -
idTokenAdditionalParameters
-
validateScopes
-
createOAuth2AccessTokenAuthenticationToken
protected org.springframework.security.oauth2.server.authorization.authentication.OAuth2AccessTokenAuthenticationToken createOAuth2AccessTokenAuthenticationToken(org.springframework.security.core.Authentication source, org.springframework.security.oauth2.server.authorization.authentication.OAuth2AccessTokenAuthenticationToken destination)
-