Class SecurityAuthenticatorSupport
- java.lang.Object
-
- org.apache.camel.component.netty.http.SecurityAuthenticatorSupport
-
- All Implemented Interfaces:
SecurityAuthenticator
- Direct Known Subclasses:
JAASSecurityAuthenticator
public abstract class SecurityAuthenticatorSupport extends Object implements SecurityAuthenticator
A base class forSecurityAuthenticator.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSecurityAuthenticatorSupport.HttpPrincipalCallbackHandlerCallbackHandlerthat provides the username and password.
-
Constructor Summary
Constructors Constructor Description SecurityAuthenticatorSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()Gets the name of the realm.StringgetUserRoles(Subject subject)Gets the user roles from the givenSubjectprotected booleanisRoleClass(Principal principal)Is the given principal a role class?voidsetName(String name)Sets the name of the realm to use.voidsetRoleClassNames(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
-
-
-
-
Method Detail
-
setName
public void setName(String name)
Description copied from interface:SecurityAuthenticatorSets the name of the realm to use.- Specified by:
setNamein interfaceSecurityAuthenticator
-
getName
public String getName()
Description copied from interface:SecurityAuthenticatorGets the name of the realm.- Specified by:
getNamein interfaceSecurityAuthenticator
-
setRoleClassNames
public void setRoleClassNames(String roleClassNames)
Description copied from interface:SecurityAuthenticatorSets the role class names (separated by comma) By default if no explicit role class names has been configured, then this implementation will assume theSubjectPrincipals is a role if the classname contains the word role (lower cased).- Specified by:
setRoleClassNamesin interfaceSecurityAuthenticator- Parameters:
roleClassNames- a list of FQN class names for rolePrincipalimplementations.
-
isRoleClass
protected boolean isRoleClass(Principal principal)
Is the given principal a role class?- Parameters:
principal- the principal- Returns:
- true if role class, false if not
-
getUserRoles
public String getUserRoles(Subject subject)
Description copied from interface:SecurityAuthenticatorGets the user roles from the givenSubject- Specified by:
getUserRolesin interfaceSecurityAuthenticator- Parameters:
subject- the subject- Returns:
- null if no roles, otherwise a String with roles separated by comma.
-
-