Class AbstractSaslRequest

java.lang.Object
org.apache.directory.ldap.client.api.AbstractSaslRequest
All Implemented Interfaces:
SaslRequest
Direct Known Subclasses:
SaslCramMd5Request, SaslDigestMd5Request, SaslExternalRequest, SaslGssApiRequest, SaslPlainRequest

public abstract class AbstractSaslRequest extends Object implements SaslRequest
Holds the data required to complete the SASL operation
Author:
Apache Directory Project
  • Field Details

    • saslMechanism

      protected String saslMechanism
      The mechanism used to decode user identity
    • controls

      protected List<org.apache.directory.api.ldap.model.message.Control> controls
      The list of controls
    • username

      protected String username
      The username
    • credentials

      protected byte[] credentials
      The credentials
    • realmName

      protected String realmName
      The realm name on the server
    • authorizationId

      protected String authorizationId
      The authorization ID of the entity
    • qualityOfProtection

      protected org.apache.directory.api.ldap.model.constants.SaslQoP qualityOfProtection
      The quality of protection
    • securityStrength

      protected org.apache.directory.api.ldap.model.constants.SaslSecurityStrength securityStrength
      The security strength
    • mutualAuthentication

      protected boolean mutualAuthentication
      Require mutual authentication
  • Constructor Details

    • AbstractSaslRequest

      protected AbstractSaslRequest(String saslMechanism)
      Creates a new instance of SaslRequest.
      Parameters:
      saslMechanism - the SASL mechanism
  • Method Details

    • addAllControls

      public void addAllControls(org.apache.directory.api.ldap.model.message.Control[] controls)
      Adds the given controls.
      Parameters:
      controls - the controls
    • addControl

      public void addControl(org.apache.directory.api.ldap.model.message.Control control)
      Adds the given control.
      Parameters:
      control - the control
    • getAuthorizationId

      public String getAuthorizationId()
      Gets the authorization ID.
      Specified by:
      getAuthorizationId in interface SaslRequest
      Returns:
      the authorization ID
    • getControls

      public org.apache.directory.api.ldap.model.message.Control[] getControls()
      Gets the controls.
      Specified by:
      getControls in interface SaslRequest
      Returns:
      the controls
    • getCredentials

      public byte[] getCredentials()
      Gets the crendentials
      Specified by:
      getCredentials in interface SaslRequest
      Returns:
      the credentials
    • getQualityOfProtection

      public org.apache.directory.api.ldap.model.constants.SaslQoP getQualityOfProtection()
      Gets the quality of protection.
      Specified by:
      getQualityOfProtection in interface SaslRequest
      Returns:
      the quality of protection
    • getRealmName

      public String getRealmName()
      Gets realm name.
      Specified by:
      getRealmName in interface SaslRequest
      Returns:
      the realm name
    • getSaslMechanism

      public String getSaslMechanism()
      Gets the SASL mechanism.
      Specified by:
      getSaslMechanism in interface SaslRequest
      Returns:
      the SASL mechanism
    • getSecurityStrength

      public org.apache.directory.api.ldap.model.constants.SaslSecurityStrength getSecurityStrength()
      Gets the security strength.
      Specified by:
      getSecurityStrength in interface SaslRequest
      Returns:
      the security strength
    • getUsername

      public String getUsername()
      Gets the username.
      Specified by:
      getUsername in interface SaslRequest
      Returns:
      the username
    • isMutualAuthentication

      public boolean isMutualAuthentication()
      Indicates if mutual authentication is required.
      Specified by:
      isMutualAuthentication in interface SaslRequest
      Returns:
      the flag indicating if mutual authentication is required
    • setAuthorizationId

      public void setAuthorizationId(String authorizationId)
      Sets the Authorization ID
      Parameters:
      authorizationId - The authorization ID
    • setCredentials

      public void setCredentials(byte[] credentials)
      Sets the credentials.
      Parameters:
      credentials - the credentials
    • setCredentials

      public void setCredentials(String credentials)
      Sets the credentials.
      Parameters:
      credentials - the credentials
    • setMutualAuthentication

      public void setMutualAuthentication(boolean mutualAuthentication)
      Sets the flag indicating if mutual authentication is required.
      Parameters:
      mutualAuthentication - the flag indicating if mutual authentication is required
    • setQualityOfProtection

      public void setQualityOfProtection(org.apache.directory.api.ldap.model.constants.SaslQoP qualityOfProtection)
      Sets the quality of protection.
      Parameters:
      qualityOfProtection - the quality of protection
    • setRealmName

      protected void setRealmName(String realmName)
      Sets the realm name.
      Parameters:
      realmName - The realm name
    • setSaslMechanism

      protected void setSaslMechanism(String saslMechanism)
      Sets the SASL mechanism
      Parameters:
      saslMechanism - the SASL mechanism
    • setSecurityStrength

      public void setSecurityStrength(org.apache.directory.api.ldap.model.constants.SaslSecurityStrength securityStrength)
      Sets the security strength.
      Parameters:
      securityStrength - the security strength
    • setUsername

      public void setUsername(String username)
      Sets the username.
      Parameters:
      username - the username