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 for SecurityAuthenticator.
  • Constructor Details

    • SecurityAuthenticatorSupport

      protected SecurityAuthenticatorSupport()
  • Method Details

    • setName

      public void setName(String name)
      Description copied from interface: SecurityAuthenticator
      Sets the name of the realm to use.
      Specified by:
      setName in interface SecurityAuthenticator
    • getName

      public String getName()
      Description copied from interface: SecurityAuthenticator
      Gets the name of the realm.
      Specified by:
      getName in interface SecurityAuthenticator
    • setRoleClassNames

      public void setRoleClassNames(String roleClassNames)
      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 the Subject Principals is a role if the classname contains the word role (lower cased).

      Specified by:
      setRoleClassNames in interface SecurityAuthenticator
      Parameters:
      roleClassNames - a list of FQN class names for role Principal implementations.
    • 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: SecurityAuthenticator
      Gets the user roles from the given Subject
      Specified by:
      getUserRoles in interface SecurityAuthenticator
      Parameters:
      subject - the subject
      Returns:
      null if no roles, otherwise a String with roles separated by comma.