public class ClientSecretAuthenticationProvider extends Object implements org.springframework.security.authentication.AuthenticationProvider
Description: 扩展的 ClientSecretAuthenticationProvider
增加 Client 权限数据
| 构造器和说明 |
|---|
ClientSecretAuthenticationProvider(org.springframework.security.oauth2.server.authorization.client.RegisteredClientRepository registeredClientRepository,
org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationService authorizationService,
cn.herodotus.engine.oauth2.core.definition.service.ClientDetailsService clientDetailsService)
Constructs a
ClientSecretAuthenticationProvider using the provided parameters. |
| 限定符和类型 | 方法和说明 |
|---|---|
org.springframework.security.core.Authentication |
authenticate(org.springframework.security.core.Authentication authentication) |
void |
setPasswordEncoder(org.springframework.security.crypto.password.PasswordEncoder passwordEncoder)
Sets the
PasswordEncoder used to validate
the client secret. |
boolean |
supports(Class<?> authentication) |
public ClientSecretAuthenticationProvider(org.springframework.security.oauth2.server.authorization.client.RegisteredClientRepository registeredClientRepository,
org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationService authorizationService,
cn.herodotus.engine.oauth2.core.definition.service.ClientDetailsService clientDetailsService)
ClientSecretAuthenticationProvider using the provided parameters.registeredClientRepository - the repository of registered clientsauthorizationService - the authorization servicepublic void setPasswordEncoder(org.springframework.security.crypto.password.PasswordEncoder passwordEncoder)
PasswordEncoder used to validate
the client secret.
If not set, the client secret will be compared using
PasswordEncoderFactories.createDelegatingPasswordEncoder().passwordEncoder - the PasswordEncoder used to validate the client secretpublic 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.AuthenticationExceptionpublic boolean supports(Class<?> authentication)
supports 在接口中 org.springframework.security.authentication.AuthenticationProviderCopyright © 2022. All rights reserved.