Package org.ldaptive.sasl
Class SaslConfig
- java.lang.Object
-
- org.ldaptive.AbstractFreezable
-
- org.ldaptive.AbstractConfig
-
- org.ldaptive.sasl.SaslConfig
-
- All Implemented Interfaces:
Freezable
public final class SaslConfig extends AbstractConfig
Contains basic configuration data for SASL authentication.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SaslConfig.Builder
-
Field Summary
Fields Modifier and Type Field Description private String
authorizationId
sasl authorization id.private Mechanism
mechanism
sasl mechanism.private Boolean
mutualAuthentication
perform mutual authentication.private Map<String,Object>
properties
sasl properties.private QualityOfProtection[]
qualityOfProtection
sasl quality of protection.private String
saslRealm
sasl realm.private SecurityStrength[]
securityStrength
sasl security strength.-
Fields inherited from class org.ldaptive.AbstractConfig
logger
-
-
Constructor Summary
Constructors Constructor Description SaslConfig()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SaslConfig.Builder
builder()
Creates a builder for this class.static SaslConfig
copy(SaslConfig config)
Returns a sasl config initialized with the supplied config.String
getAuthorizationId()
Returns the sasl authorization id.Mechanism
getMechanism()
Returns the sasl mechanism.Boolean
getMutualAuthentication()
Returns whether mutual authentication should occur.Map<String,?>
getProperties()
Returns sasl properties.Object
getProperty(String name)
Returns a sasl property.QualityOfProtection[]
getQualityOfProtection()
Returns the sasl quality of protection.String
getRealm()
Returns the sasl realm.SecurityStrength[]
getSecurityStrength()
Returns the sasl security strength.void
setAuthorizationId(String id)
Sets the sasl authorization id.void
setMechanism(Mechanism m)
Sets the sasl mechanism.void
setMutualAuthentication(Boolean b)
Sets whether mutual authentication should occur.void
setProperties(Map<String,?> props)
Sets sasl properties.void
setProperty(String name, Object value)
Sets a sasl property.void
setQualityOfProtection(QualityOfProtection... qop)
Sets the sasl quality of protection.void
setRealm(String realm)
Sets the sasl realm.void
setSecurityStrength(SecurityStrength... ss)
Sets the sasl security strength.String
toString()
-
Methods inherited from class org.ldaptive.AbstractConfig
checkArrayContainsNull, checkStringInput
-
Methods inherited from class org.ldaptive.AbstractFreezable
assertMutable, freeze, freeze, freeze, isFrozen
-
-
-
-
Field Detail
-
mechanism
private Mechanism mechanism
sasl mechanism.
-
authorizationId
private String authorizationId
sasl authorization id.
-
mutualAuthentication
private Boolean mutualAuthentication
perform mutual authentication.
-
qualityOfProtection
private QualityOfProtection[] qualityOfProtection
sasl quality of protection.
-
securityStrength
private SecurityStrength[] securityStrength
sasl security strength.
-
saslRealm
private String saslRealm
sasl realm.
-
-
Method Detail
-
getMechanism
public Mechanism getMechanism()
Returns the sasl mechanism.- Returns:
- mechanism
-
setMechanism
public void setMechanism(Mechanism m)
Sets the sasl mechanism.- Parameters:
m
- mechanism
-
getAuthorizationId
public String getAuthorizationId()
Returns the sasl authorization id.- Returns:
- authorization id
-
setAuthorizationId
public void setAuthorizationId(String id)
Sets the sasl authorization id.- Parameters:
id
- authorization id
-
getMutualAuthentication
public Boolean getMutualAuthentication()
Returns whether mutual authentication should occur.- Returns:
- whether mutual authentication should occur
-
setMutualAuthentication
public void setMutualAuthentication(Boolean b)
Sets whether mutual authentication should occur.- Parameters:
b
- whether mutual authentication should occur
-
getQualityOfProtection
public QualityOfProtection[] getQualityOfProtection()
Returns the sasl quality of protection.- Returns:
- quality of protection
-
setQualityOfProtection
public void setQualityOfProtection(QualityOfProtection... qop)
Sets the sasl quality of protection.- Parameters:
qop
- quality of protection
-
getSecurityStrength
public SecurityStrength[] getSecurityStrength()
Returns the sasl security strength.- Returns:
- security strength
-
setSecurityStrength
public void setSecurityStrength(SecurityStrength... ss)
Sets the sasl security strength.- Parameters:
ss
- security strength
-
getRealm
public String getRealm()
Returns the sasl realm.- Returns:
- realm
-
setRealm
public void setRealm(String realm)
Sets the sasl realm.- Parameters:
realm
- to set
-
setProperties
public void setProperties(Map<String,?> props)
Sets sasl properties.- Parameters:
props
- to set
-
getProperty
public Object getProperty(String name)
Returns a sasl property.- Parameters:
name
- of the property- Returns:
- property
-
setProperty
public void setProperty(String name, Object value)
Sets a sasl property.- Parameters:
name
- of the propertyvalue
- of the property
-
copy
public static SaslConfig copy(SaslConfig config)
Returns a sasl config initialized with the supplied config.- Parameters:
config
- sasl config to read properties from- Returns:
- sasl config
-
builder
public static SaslConfig.Builder builder()
Creates a builder for this class.- Returns:
- new builder
-
-