Class PasswordFlowAuthenticationManager

  • All Implemented Interfaces:
    org.springframework.security.authentication.AuthenticationManager, org.springframework.security.authentication.AuthenticationProvider

    public class PasswordFlowAuthenticationManager
    extends Object
    implements org.springframework.security.authentication.AuthenticationManager, org.springframework.security.authentication.AuthenticationProvider
    The password flow authentication manager.
    Author:
    Christian Bremer
    • Constructor Summary

      Constructors 
      Constructor Description
      PasswordFlowAuthenticationManager​(org.bremersee.security.authentication.ClientCredentialsFlowProperties passwordFlowProperties, org.springframework.security.oauth2.jwt.JwtDecoder jwtDecoder, org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,​? extends org.springframework.security.authentication.AbstractAuthenticationToken> jwtAuthenticationConverter, org.bremersee.security.authentication.AccessTokenRetriever<String> accessTokenRetriever)
      Instantiates a new password flow authentication manager.
    • Constructor Detail

      • PasswordFlowAuthenticationManager

        public PasswordFlowAuthenticationManager​(org.bremersee.security.authentication.ClientCredentialsFlowProperties passwordFlowProperties,
                                                 org.springframework.security.oauth2.jwt.JwtDecoder jwtDecoder,
                                                 @Nullable
                                                 org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,​? extends org.springframework.security.authentication.AbstractAuthenticationToken> jwtAuthenticationConverter,
                                                 org.bremersee.security.authentication.AccessTokenRetriever<String> accessTokenRetriever)
        Instantiates a new password flow authentication manager.
        Parameters:
        passwordFlowProperties - the password flow properties
        jwtDecoder - the jwt decoder
        jwtAuthenticationConverter - the jwt authentication converter
        accessTokenRetriever - the access token retriever
    • Method Detail

      • authenticate

        public org.springframework.security.core.Authentication authenticate​(org.springframework.security.core.Authentication authentication)
                                                                      throws org.springframework.security.core.AuthenticationException
        Specified by:
        authenticate in interface org.springframework.security.authentication.AuthenticationManager
        Specified by:
        authenticate in interface org.springframework.security.authentication.AuthenticationProvider
        Throws:
        org.springframework.security.core.AuthenticationException
      • supports

        public boolean supports​(Class<?> authentication)
        Specified by:
        supports in interface org.springframework.security.authentication.AuthenticationProvider