public abstract class AbstractOAuth2ResourceOwnerAuthenticationProvider<T extends AbstractOAuth2ResourceOwnerAuthenticationToken> extends Object implements org.springframework.security.authentication.AuthenticationProvider
AuthenticationProvider implementation for the OAuth 2.0 Resource Owner| 限定符 | 构造器和说明 |
|---|---|
protected |
AbstractOAuth2ResourceOwnerAuthenticationProvider(org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationService authorizationService,
org.springframework.security.oauth2.server.authorization.token.OAuth2TokenGenerator<? extends org.springframework.security.oauth2.core.OAuth2Token> tokenGenerator)
Constructs an
AbstractOAuth2ResourceOwnerAuthenticationProvider using the
provided parameters. |
| 限定符和类型 | 方法和说明 |
|---|---|
org.springframework.security.core.Authentication |
authenticate(org.springframework.security.core.Authentication authentication) |
protected abstract org.springframework.security.core.Authentication |
getAuthenticatedAuthentication(T authentication)
根据请求的 authentication 转换为认证后的 authentication
|
protected AbstractOAuth2ResourceOwnerAuthenticationProvider(org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationService authorizationService,
org.springframework.security.oauth2.server.authorization.token.OAuth2TokenGenerator<? extends org.springframework.security.oauth2.core.OAuth2Token> tokenGenerator)
AbstractOAuth2ResourceOwnerAuthenticationProvider using the
provided parameters.authorizationService - the authorization servicetokenGenerator - the token generatorpublic org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication)
throws org.springframework.security.core.AuthenticationException
authenticate 在接口中 org.springframework.security.authentication.AuthenticationProviderorg.springframework.security.core.AuthenticationExceptionprotected abstract org.springframework.security.core.Authentication getAuthenticatedAuthentication(T authentication) throws org.springframework.security.core.AuthenticationException
authentication - 认证前的 authenticationorg.springframework.security.core.AuthenticationException - 当认证校验不通过时进行异常抛出Copyright © 2023. All rights reserved.