Package org.apache.activemq.shiro.authc
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.-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.shiro.authc.AuthenticationTokenReturns a ShiroAuthenticationTokeninstance that should be used to authenticate the connection'sSubject, ornullif no authentication information can be obtained.
-
Method Details
-
getAuthenticationToken
org.apache.shiro.authc.AuthenticationToken getAuthenticationToken(SubjectConnectionReference ref) throws Exception Returns a ShiroAuthenticationTokeninstance that should be used to authenticate the connection'sSubject, ornullif no authentication information can be obtained. If noAuthenticationTokencan 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
AuthenticationTokeninstance that should be used to authenticate the connection'sSubject, ornullif no authentication information can be obtained. - Throws:
Exception- if there is a problem acquiring/creating an expectedAuthenticationToken.
-