Class SecurityAuthenticatorSupport
java.lang.Object
org.apache.camel.component.netty.http.SecurityAuthenticatorSupport
- All Implemented Interfaces:
SecurityAuthenticator
- Direct Known Subclasses:
JAASSecurityAuthenticator
A base class for
SecurityAuthenticator
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
CallbackHandler
that provides the username and password. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
Gets the name of the realm.getUserRoles
(Subject subject) Gets the user roles from the givenSubject
protected boolean
isRoleClass
(Principal principal) Is the given principal a role class?void
Sets the name of the realm to use.void
setRoleClassNames
(String roleClassNames) Sets the role class names (separated by comma)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.camel.component.netty.http.SecurityAuthenticator
login, logout
-
Constructor Details
-
SecurityAuthenticatorSupport
protected SecurityAuthenticatorSupport()
-
-
Method Details
-
setName
Description copied from interface:SecurityAuthenticator
Sets the name of the realm to use.- Specified by:
setName
in interfaceSecurityAuthenticator
-
getName
Description copied from interface:SecurityAuthenticator
Gets the name of the realm.- Specified by:
getName
in interfaceSecurityAuthenticator
-
setRoleClassNames
Description copied from interface:SecurityAuthenticator
Sets the role class names (separated by comma) By default if no explicit role class names has been configured, then this implementation will assume theSubject
Principal
s is a role if the classname contains the word role (lower cased).- Specified by:
setRoleClassNames
in interfaceSecurityAuthenticator
- Parameters:
roleClassNames
- a list of FQN class names for rolePrincipal
implementations.
-
isRoleClass
Is the given principal a role class?- Parameters:
principal
- the principal- Returns:
- true if role class, false if not
-
getUserRoles
Description copied from interface:SecurityAuthenticator
Gets the user roles from the givenSubject
- Specified by:
getUserRoles
in interfaceSecurityAuthenticator
- Parameters:
subject
- the subject- Returns:
- null if no roles, otherwise a String with roles separated by comma.
-