Class AbstractSaslRequest
java.lang.Object
org.apache.directory.ldap.client.api.AbstractSaslRequest
- All Implemented Interfaces:
SaslRequest
- Direct Known Subclasses:
SaslCramMd5Request, SaslDigestMd5Request, SaslExternalRequest, SaslGssApiRequest, SaslPlainRequest
Holds the data required to complete the SASL operation
- Author:
- Apache Directory Project
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe authorization ID of the entityprotected List<org.apache.directory.api.ldap.model.message.Control> The list of controlsprotected byte[]The credentialsprotected booleanRequire mutual authenticationprotected org.apache.directory.api.ldap.model.constants.SaslQoPThe quality of protectionprotected StringThe realm name on the serverprotected StringThe mechanism used to decode user identityprotected org.apache.directory.api.ldap.model.constants.SaslSecurityStrengthThe security strengthprotected StringThe username -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSaslRequest(String saslMechanism) Creates a new instance of SaslRequest. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAllControls(org.apache.directory.api.ldap.model.message.Control[] controls) Adds the given controls.voidaddControl(org.apache.directory.api.ldap.model.message.Control control) Adds the given control.Gets the authorization ID.org.apache.directory.api.ldap.model.message.Control[]Gets the controls.byte[]Gets the crendentialsorg.apache.directory.api.ldap.model.constants.SaslQoPGets the quality of protection.Gets realm name.Gets the SASL mechanism.org.apache.directory.api.ldap.model.constants.SaslSecurityStrengthGets the security strength.Gets the username.booleanIndicates if mutual authentication is required.voidsetAuthorizationId(String authorizationId) Sets the Authorization IDvoidsetCredentials(byte[] credentials) Sets the credentials.voidsetCredentials(String credentials) Sets the credentials.voidsetMutualAuthentication(boolean mutualAuthentication) Sets the flag indicating if mutual authentication is required.voidsetQualityOfProtection(org.apache.directory.api.ldap.model.constants.SaslQoP qualityOfProtection) Sets the quality of protection.protected voidsetRealmName(String realmName) Sets the realm name.protected voidsetSaslMechanism(String saslMechanism) Sets the SASL mechanismvoidsetSecurityStrength(org.apache.directory.api.ldap.model.constants.SaslSecurityStrength securityStrength) Sets the security strength.voidsetUsername(String username) Sets the username.
-
Field Details
-
saslMechanism
The mechanism used to decode user identity -
controls
The list of controls -
username
The username -
credentials
protected byte[] credentialsThe credentials -
realmName
The realm name on the server -
authorizationId
The authorization ID of the entity -
qualityOfProtection
protected org.apache.directory.api.ldap.model.constants.SaslQoP qualityOfProtectionThe quality of protection -
securityStrength
protected org.apache.directory.api.ldap.model.constants.SaslSecurityStrength securityStrengthThe security strength -
mutualAuthentication
protected boolean mutualAuthenticationRequire mutual authentication
-
-
Constructor Details
-
AbstractSaslRequest
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
Gets the authorization ID.- Specified by:
getAuthorizationIdin interfaceSaslRequest- Returns:
- the authorization ID
-
getControls
public org.apache.directory.api.ldap.model.message.Control[] getControls()Gets the controls.- Specified by:
getControlsin interfaceSaslRequest- Returns:
- the controls
-
getCredentials
public byte[] getCredentials()Gets the crendentials- Specified by:
getCredentialsin interfaceSaslRequest- Returns:
- the credentials
-
getQualityOfProtection
public org.apache.directory.api.ldap.model.constants.SaslQoP getQualityOfProtection()Gets the quality of protection.- Specified by:
getQualityOfProtectionin interfaceSaslRequest- Returns:
- the quality of protection
-
getRealmName
Gets realm name.- Specified by:
getRealmNamein interfaceSaslRequest- Returns:
- the realm name
-
getSaslMechanism
Gets the SASL mechanism.- Specified by:
getSaslMechanismin interfaceSaslRequest- Returns:
- the SASL mechanism
-
getSecurityStrength
public org.apache.directory.api.ldap.model.constants.SaslSecurityStrength getSecurityStrength()Gets the security strength.- Specified by:
getSecurityStrengthin interfaceSaslRequest- Returns:
- the security strength
-
getUsername
Gets the username.- Specified by:
getUsernamein interfaceSaslRequest- Returns:
- the username
-
isMutualAuthentication
public boolean isMutualAuthentication()Indicates if mutual authentication is required.- Specified by:
isMutualAuthenticationin interfaceSaslRequest- Returns:
- the flag indicating if mutual authentication is required
-
setAuthorizationId
Sets the Authorization ID- Parameters:
authorizationId- The authorization ID
-
setCredentials
public void setCredentials(byte[] credentials) Sets the credentials.- Parameters:
credentials- the credentials
-
setCredentials
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
Sets the realm name.- Parameters:
realmName- The realm name
-
setSaslMechanism
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
-