Interface AuthenticationService

    • Method Detail

      • getAuthenticationEnabled

        @Auditable(parameters="userName")
        boolean getAuthenticationEnabled​(java.lang.String userName)
                                  throws org.alfresco.repo.security.authentication.AuthenticationException
        Is an authentication enabled or disabled?
        Throws:
        org.alfresco.repo.security.authentication.AuthenticationException
      • authenticate

        @Auditable(parameters={"userName","password"},
                   recordable={true,false})
        void authenticate​(java.lang.String userName,
                          char[] password)
                   throws org.alfresco.repo.security.authentication.AuthenticationException
        Carry out an authentication attempt. If successful the user is set to the current user. The current user is a part of the thread context.
        Parameters:
        userName - the username
        password - the passowrd
        Throws:
        org.alfresco.repo.security.authentication.AuthenticationException
      • authenticateAsGuest

        @Auditable
        void authenticateAsGuest()
                          throws org.alfresco.repo.security.authentication.AuthenticationException
        Authenticate as the guest user. This may not be allowed and throw an exception.
        Throws:
        org.alfresco.repo.security.authentication.AuthenticationException
      • guestUserAuthenticationAllowed

        @Auditable
        boolean guestUserAuthenticationAllowed()
        Check if Guest user authentication is allowed.
        Returns:
        true if Guest user authentication is allowed, false otherwise
      • authenticationExists

        @Auditable(parameters="userName")
        boolean authenticationExists​(java.lang.String userName)
        Check if the given authentication exists.
        Parameters:
        userName - the username
        Returns:
        Returns true if the authentication exists
      • getCurrentUserName

        @Auditable
        java.lang.String getCurrentUserName()
                                     throws org.alfresco.repo.security.authentication.AuthenticationException
        Get the name of the currently authenticated user.
        Returns:
        String
        Throws:
        org.alfresco.repo.security.authentication.AuthenticationException
      • invalidateUserSession

        @Auditable(parameters="userName")
        void invalidateUserSession​(java.lang.String userName)
                            throws org.alfresco.repo.security.authentication.AuthenticationException
        Invalidate any tickets held by the user.
        Throws:
        org.alfresco.repo.security.authentication.AuthenticationException
      • invalidateTicket

        @Auditable(parameters="ticket",
                   recordable=false)
        void invalidateTicket​(java.lang.String ticket)
                       throws org.alfresco.repo.security.authentication.AuthenticationException
        Invalidate a single ticket by ID
        Parameters:
        ticket - String
        Throws:
        org.alfresco.repo.security.authentication.AuthenticationException
      • validate

        @Auditable(parameters="ticket",
                   recordable=false)
        void validate​(java.lang.String ticket)
               throws org.alfresco.repo.security.authentication.AuthenticationException
        Validate a ticket. Set the current user name accordingly.
        Parameters:
        ticket - String
        Throws:
        org.alfresco.repo.security.authentication.AuthenticationException
      • getCurrentTicket

        @Auditable
        java.lang.String getCurrentTicket()
        Get the current ticket as a string
        Returns:
        String
      • getNewTicket

        @Auditable
        java.lang.String getNewTicket()
        Get a new ticket as a string
        Returns:
        String
      • clearCurrentSecurityContext

        @Auditable
        void clearCurrentSecurityContext()
        Remove the current security information
      • isCurrentUserTheSystemUser

        @Auditable
        boolean isCurrentUserTheSystemUser()
        Is the current user the system user?
      • getDomains

        @Auditable
        java.util.Set<java.lang.String> getDomains()
        Get the domain to which this instance of an authentication service applies.
        Returns:
        The domain name
      • getDomainsThatAllowUserCreation

        @Auditable
        java.util.Set<java.lang.String> getDomainsThatAllowUserCreation()
        Does this instance alow user to be created?
      • getDomainsThatAllowUserDeletion

        @Auditable
        java.util.Set<java.lang.String> getDomainsThatAllowUserDeletion()
        Does this instance allow users to be deleted?
      • getDomiansThatAllowUserPasswordChanges

        @Auditable
        java.util.Set<java.lang.String> getDomiansThatAllowUserPasswordChanges()
        Does this instance allow users to update their passwords?
      • getDefaultAdministratorUserNames

        @Auditable
        java.util.Set<java.lang.String> getDefaultAdministratorUserNames()
        Gets a set of user names who should be considered 'administrators' by default.
        Returns:
        a set of user names
      • getDefaultGuestUserNames

        @Auditable
        java.util.Set<java.lang.String> getDefaultGuestUserNames()
        Gets a set of user names who should be considered 'guests' by default.
        Returns:
        a set of user names