Class IdentityServiceAuthenticationComponent

  • All Implemented Interfaces:
    ActivateableBean, AuthenticationComponent, AuthenticationContext

    public class IdentityServiceAuthenticationComponent
    extends AbstractAuthenticationComponent
    implements ActivateableBean
    Authenticates a user against Keycloak. Keycloak's AuthzClient is used to retrieve an access token for the provided user credentials, user is set as the current user if the user's access token can be obtained.
    The AuthzClient can be null in which case this authenticator will just fall through to the next one in the chain.
    • Constructor Detail

      • IdentityServiceAuthenticationComponent

        public IdentityServiceAuthenticationComponent()
    • Method Detail

      • setAuthenticatorAuthzClient

        public void setAuthenticatorAuthzClient​(org.keycloak.authorization.client.AuthzClient authenticatorAuthzClient)
      • setAllowGuestLogin

        public void setAllowGuestLogin​(boolean allowGuestLogin)
      • authenticateImpl

        public void authenticateImpl​(java.lang.String userName,
                                     char[] password)
                              throws org.alfresco.repo.security.authentication.AuthenticationException
        Description copied from class: AbstractAuthenticationComponent
        Default unsupported authentication implementation - as of 2.1 this is the best way to implement your own authentication component as it will support guest login - prior to this direct over ride for authenticate(String , char[]) was used. This will still work.
        Overrides:
        authenticateImpl in class AbstractAuthenticationComponent
        Parameters:
        userName - String
        password - char[]
        Throws:
        org.alfresco.repo.security.authentication.AuthenticationException
      • setActive

        public void setActive​(boolean active)
      • isActive

        public boolean isActive()
        Description copied from interface: ActivateableBean
        Determines whether this bean is active.
        Specified by:
        isActive in interface ActivateableBean
        Returns:
        true if this bean is active