类 OAuth2ResourceOwnerPasswordAuthenticationProvider

所有已实现的接口:
org.springframework.security.authentication.AuthenticationProvider

public class OAuth2ResourceOwnerPasswordAuthenticationProvider extends AbstractUserDetailsAuthenticationProvider

Description: 自定义 OAuth2 密码模式认证 Provider

作者:
: gengwei.zheng
Date:
: 2022/2/22 16:02
  • 构造器详细资料

    • OAuth2ResourceOwnerPasswordAuthenticationProvider

      public OAuth2ResourceOwnerPasswordAuthenticationProvider(org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationService authorizationService, org.springframework.security.oauth2.server.authorization.token.OAuth2TokenGenerator<? extends org.springframework.security.oauth2.core.OAuth2Token> tokenGenerator, org.springframework.security.core.userdetails.UserDetailsService userDetailsService, OAuth2AuthenticationProperties complianceProperties)
      Constructs an OAuth2ClientCredentialsAuthenticationProvider using the provided parameters.
      参数:
      authorizationService - the authorization service
      tokenGenerator - – the token generator
  • 方法详细资料

    • additionalAuthenticationChecks

      protected void additionalAuthenticationChecks(org.springframework.security.core.userdetails.UserDetails userDetails, Map<String,Object> additionalParameters) throws org.springframework.security.core.AuthenticationException
      指定者:
      additionalAuthenticationChecks 在类中 AbstractUserDetailsAuthenticationProvider
      抛出:
      org.springframework.security.core.AuthenticationException
    • retrieveUser

      protected org.springframework.security.core.userdetails.UserDetails retrieveUser(Map<String,Object> additionalParameters) throws org.springframework.security.core.AuthenticationException
      指定者:
      retrieveUser 在类中 AbstractUserDetailsAuthenticationProvider
      抛出:
      org.springframework.security.core.AuthenticationException
    • authenticate

      public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException
      抛出:
      org.springframework.security.core.AuthenticationException
    • setSessionRegistry

      public void setSessionRegistry(org.springframework.security.core.session.SessionRegistry sessionRegistry)
      Sets the SessionRegistry used to track OpenID Connect sessions.
      参数:
      sessionRegistry - the SessionRegistry used to track OpenID Connect sessions
      从以下版本开始:
      1.1.1
    • supports

      public boolean supports(Class<?> authentication)