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 Summary
Fields Modifier and Type Field Description protected StringauthorizationIdThe authorization ID of the entityprotected List<Control>controlsThe list of controlsprotected byte[]credentialsThe credentialsprotected booleanmutualAuthenticationRequire mutual authenticationprotected SaslQoPqualityOfProtectionThe quality of protectionprotected StringrealmNameThe realm name on the serverprotected StringsaslMechanismThe mechanism used to decode user identityprotected SaslSecurityStrengthsecurityStrengthThe security strengthprotected StringusernameThe username
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractSaslRequest(String saslMechanism)Creates a new instance of SaslRequest.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAllControls(Control[] controls)Adds the given controls.voidaddControl(Control control)Adds the given control.StringgetAuthorizationId()Gets the authorization ID.Control[]getControls()Gets the controls.byte[]getCredentials()Gets the crendentialsSaslQoPgetQualityOfProtection()Gets the quality of protection.StringgetRealmName()Gets realm name.StringgetSaslMechanism()Gets the SASL mechanism.SaslSecurityStrengthgetSecurityStrength()Gets the security strength.StringgetUsername()Gets the username.booleanisMutualAuthentication()Indicates 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(SaslQoP qualityOfProtection)Sets the quality of protection.protected voidsetRealmName(String realmName)Sets the realm name.protected voidsetSaslMechanism(String saslMechanism)Sets the SASL mechanismvoidsetSecurityStrength(SaslSecurityStrength securityStrength)Sets the security strength.voidsetUsername(String username)Sets the username.
-
-
-
Field Detail
-
saslMechanism
protected String saslMechanism
The mechanism used to decode user identity
-
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 SaslQoP qualityOfProtection
The quality of protection
-
securityStrength
protected SaslSecurityStrength securityStrength
The security strength
-
mutualAuthentication
protected boolean mutualAuthentication
Require mutual authentication
-
-
Constructor Detail
-
AbstractSaslRequest
protected AbstractSaslRequest(String saslMechanism)
Creates a new instance of SaslRequest.- Parameters:
saslMechanism- the SASL mechanism
-
-
Method Detail
-
addAllControls
public void addAllControls(Control[] controls)
Adds the given controls.- Parameters:
controls- the controls
-
addControl
public void addControl(Control control)
Adds the given control.- Parameters:
control- the control
-
getAuthorizationId
public String getAuthorizationId()
Gets the authorization ID.- Specified by:
getAuthorizationIdin interfaceSaslRequest- Returns:
- the authorization ID
-
getControls
public 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 SaslQoP getQualityOfProtection()
Gets the quality of protection.- Specified by:
getQualityOfProtectionin interfaceSaslRequest- Returns:
- the quality of protection
-
getRealmName
public String getRealmName()
Gets realm name.- Specified by:
getRealmNamein interfaceSaslRequest- Returns:
- the realm name
-
getSaslMechanism
public String getSaslMechanism()
Gets the SASL mechanism.- Specified by:
getSaslMechanismin interfaceSaslRequest- Returns:
- the SASL mechanism
-
getSecurityStrength
public SaslSecurityStrength getSecurityStrength()
Gets the security strength.- Specified by:
getSecurityStrengthin interfaceSaslRequest- Returns:
- the security strength
-
getUsername
public String 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
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(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(SaslSecurityStrength securityStrength)
Sets the security strength.- Parameters:
securityStrength- the security strength
-
setUsername
public void setUsername(String username)
Sets the username.- Parameters:
username- the username
-
-