Interface AuthenticationTokenFactory

All Known Implementing Classes:
DefaultAuthenticationTokenFactory

public interface AuthenticationTokenFactory
A AuthenticationTokenFactory inspects a newly-added ActiveMQ connection and returns a Shiro AuthenticationToken instance representing credentials associated with the connection. These credentials can be used to authenticate the connection, allowing for later identity and authorization (access control) checks.
Since:
5.10.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.shiro.authc.AuthenticationToken
    Returns a Shiro AuthenticationToken instance that should be used to authenticate the connection's Subject, or null if no authentication information can be obtained.
  • Method Details

    • 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.