Interface AuthenticationTokenFactory

    • Method Detail

      • getAuthenticationToken

        org.apache.shiro.authc.AuthenticationToken getAuthenticationToken​(SubjectConnectionReference ref)
                                                                   throws Exception
        Returns a Shiro AuthenticationToken instance that should be used to authenticate the connection's Subject, or null if no authentication information can be obtained.

        If no AuthenticationToken can be obtained, the connection's Subject will be considered anonymous and any downstream security checks that enforce authentication or authorization will fail (as would be expected).

        Parameters:
        ref - the subject's connection
        Returns:
        a Shiro AuthenticationToken instance that should be used to authenticate the connection's Subject, or null if no authentication information can be obtained.
        Throws:
        Exception - if there is a problem acquiring/creating an expected AuthenticationToken.