Package org.ldaptive.sasl
Class GssApiBindRequest
- java.lang.Object
-
- org.ldaptive.sasl.DefaultSaslClientRequest
-
- org.ldaptive.sasl.GssApiBindRequest
-
- All Implemented Interfaces:
CallbackHandler
public class GssApiBindRequest extends DefaultSaslClientRequest
LDAP GSSAPI bind request.
-
-
Field Summary
Fields Modifier and Type Field Description private String
authenticationID
Authentication ID.private String
authorizationID
Authorization ID.private static String
DEFAULT_GSSAPI_JAAS_NAME
Default name of the JAAS configuration.private static String
DEFAULT_GSSAPI_LOGIN_MODULE
Default login module for GSSAPI.private AtomicBoolean
invokeOnce
Boolean that ensures theGssApiSaslClient
is only returned on the first request.private static String
JAAS_LOGIN_MODULE_PROPERTY
Property for the login module class name for GSSAPI.static String
JAAS_NAME_PROPERTY
Property for the JAAS entry name from a configuration file.private static String
JAAS_OPTIONS_PROPERTY_PREFIX
SASL property to control the JAAS configuration name.static String
JAAS_REFRESH_CONFIG_PROPERTY
Property for JAAS refreshConfig.private String
jaasLoginModule
Class name of the JAAS login module to use for GSSAPI.private String
jaasName
Name of the JAAS configuration.private Map<String,?>
jaasOptions
Options set on the JAAS login module.private boolean
jaasRefreshConfig
Whether to refresh the JAAS configuration prior to use.private static Mechanism
MECHANISM
GSSAPI SASL mechanism.private String
password
Password.private Map<String,?>
saslProperties
SASL client properties.private String
saslRealm
Realm.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAuthorizationID()
Returns the SASL authorization.String
getJaasLoginModule()
Returns the class name of the JAAS login module.String
getJaasName()
Returns the entry name in a JAAS configuration file.Map<String,?>
getJaasOptions()
Returns the JAAS options for the login module.boolean
getJaasRefreshConfig()
Returns whether to refresh the JAAS configuration prior to use.Mechanism
getMechanism()
Returns the SASL mechanism.SaslClient
getSaslClient()
Returns the SASL client to use for this request.Map<String,?>
getSaslProperties()
Returns the SASL properties.void
handle(Callback[] callbacks)
String
toString()
-
Methods inherited from class org.ldaptive.sasl.DefaultSaslClientRequest
createBindRequest, createProperties, getControls, setControls
-
-
-
-
Field Detail
-
MECHANISM
private static final Mechanism MECHANISM
GSSAPI SASL mechanism.
-
JAAS_OPTIONS_PROPERTY_PREFIX
private static final String JAAS_OPTIONS_PROPERTY_PREFIX
SASL property to control the JAAS configuration name.- See Also:
- Constant Field Values
-
JAAS_NAME_PROPERTY
public static final String JAAS_NAME_PROPERTY
Property for the JAAS entry name from a configuration file.- See Also:
- Constant Field Values
-
DEFAULT_GSSAPI_JAAS_NAME
private static final String DEFAULT_GSSAPI_JAAS_NAME
Default name of the JAAS configuration.- See Also:
- Constant Field Values
-
JAAS_REFRESH_CONFIG_PROPERTY
public static final String JAAS_REFRESH_CONFIG_PROPERTY
Property for JAAS refreshConfig.- See Also:
- Constant Field Values
-
JAAS_LOGIN_MODULE_PROPERTY
private static final String JAAS_LOGIN_MODULE_PROPERTY
Property for the login module class name for GSSAPI.- See Also:
- Constant Field Values
-
DEFAULT_GSSAPI_LOGIN_MODULE
private static final String DEFAULT_GSSAPI_LOGIN_MODULE
Default login module for GSSAPI.- See Also:
- Constant Field Values
-
authenticationID
private final String authenticationID
Authentication ID.
-
authorizationID
private final String authorizationID
Authorization ID.
-
saslRealm
private final String saslRealm
Realm.
-
jaasName
private final String jaasName
Name of the JAAS configuration.
-
jaasRefreshConfig
private final boolean jaasRefreshConfig
Whether to refresh the JAAS configuration prior to use. SeeConfiguration.refresh()
.
-
jaasLoginModule
private final String jaasLoginModule
Class name of the JAAS login module to use for GSSAPI.
-
password
private final String password
Password.
-
invokeOnce
private final AtomicBoolean invokeOnce
Boolean that ensures theGssApiSaslClient
is only returned on the first request.
-
-
Constructor Detail
-
GssApiBindRequest
public GssApiBindRequest(String authID, String authzID, String pass, String realm, Map<String,Object> props)
Creates a new GSSAPI bind request.- Parameters:
authID
- to bind asauthzID
- authorization IDpass
- password to bind withrealm
- SASL realmprops
- SASL client properties
-
-
Method Detail
-
getSaslClient
public SaslClient getSaslClient()
Description copied from class:DefaultSaslClientRequest
Returns the SASL client to use for this request.- Overrides:
getSaslClient
in classDefaultSaslClientRequest
- Returns:
- SASL client
-
handle
public void handle(Callback[] callbacks) throws UnsupportedCallbackException
- Throws:
UnsupportedCallbackException
-
getMechanism
public Mechanism getMechanism()
Description copied from class:DefaultSaslClientRequest
Returns the SASL mechanism.- Specified by:
getMechanism
in classDefaultSaslClientRequest
- Returns:
- SASL mechanism
-
getAuthorizationID
public String getAuthorizationID()
Description copied from class:DefaultSaslClientRequest
Returns the SASL authorization.- Overrides:
getAuthorizationID
in classDefaultSaslClientRequest
- Returns:
- SASL authorization
-
getSaslProperties
public Map<String,?> getSaslProperties()
Description copied from class:DefaultSaslClientRequest
Returns the SASL properties.- Overrides:
getSaslProperties
in classDefaultSaslClientRequest
- Returns:
- SASL properties
-
getJaasName
public String getJaasName()
Returns the entry name in a JAAS configuration file.- Returns:
- JAAS configuration name
-
getJaasRefreshConfig
public boolean getJaasRefreshConfig()
Returns whether to refresh the JAAS configuration prior to use. SeeConfiguration.refresh()
.- Returns:
- whether to refresh the JAAS config
-
getJaasLoginModule
public String getJaasLoginModule()
Returns the class name of the JAAS login module.- Returns:
- JAAS login module class name
-
getJaasOptions
public Map<String,?> getJaasOptions()
Returns the JAAS options for the login module.- Returns:
- JAAS options
-
toString
public String toString()
- Overrides:
toString
in classDefaultSaslClientRequest
-
-