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 StringauthenticationIDAuthentication ID.private StringauthorizationIDAuthorization ID.private static StringDEFAULT_GSSAPI_JAAS_NAMEDefault name of the JAAS configuration.private static StringDEFAULT_GSSAPI_LOGIN_MODULEDefault login module for GSSAPI.private AtomicBooleaninvokeOnceBoolean that ensures theGssApiSaslClientis only returned on the first request.private static StringJAAS_LOGIN_MODULE_PROPERTYProperty for the login module class name for GSSAPI.static StringJAAS_NAME_PROPERTYProperty for the JAAS entry name from a configuration file.private static StringJAAS_OPTIONS_PROPERTY_PREFIXSASL property to control the JAAS configuration name.static StringJAAS_REFRESH_CONFIG_PROPERTYProperty for JAAS refreshConfig.private StringjaasLoginModuleClass name of the JAAS login module to use for GSSAPI.private StringjaasNameName of the JAAS configuration.private Map<String,?>jaasOptionsOptions set on the JAAS login module.private booleanjaasRefreshConfigWhether to refresh the JAAS configuration prior to use.private static MechanismMECHANISMGSSAPI SASL mechanism.private StringpasswordPassword.private Map<String,?>saslPropertiesSASL client properties.private StringsaslRealmRealm.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAuthorizationID()Returns the SASL authorization.StringgetJaasLoginModule()Returns the class name of the JAAS login module.StringgetJaasName()Returns the entry name in a JAAS configuration file.Map<String,?>getJaasOptions()Returns the JAAS options for the login module.booleangetJaasRefreshConfig()Returns whether to refresh the JAAS configuration prior to use.MechanismgetMechanism()Returns the SASL mechanism.SaslClientgetSaslClient()Returns the SASL client to use for this request.Map<String,?>getSaslProperties()Returns the SASL properties.voidhandle(Callback[] callbacks)StringtoString()-
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 theGssApiSaslClientis 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:DefaultSaslClientRequestReturns the SASL client to use for this request.- Overrides:
getSaslClientin classDefaultSaslClientRequest- Returns:
- SASL client
-
handle
public void handle(Callback[] callbacks) throws UnsupportedCallbackException
- Throws:
UnsupportedCallbackException
-
getMechanism
public Mechanism getMechanism()
Description copied from class:DefaultSaslClientRequestReturns the SASL mechanism.- Specified by:
getMechanismin classDefaultSaslClientRequest- Returns:
- SASL mechanism
-
getAuthorizationID
public String getAuthorizationID()
Description copied from class:DefaultSaslClientRequestReturns the SASL authorization.- Overrides:
getAuthorizationIDin classDefaultSaslClientRequest- Returns:
- SASL authorization
-
getSaslProperties
public Map<String,?> getSaslProperties()
Description copied from class:DefaultSaslClientRequestReturns the SASL properties.- Overrides:
getSaslPropertiesin 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:
toStringin classDefaultSaslClientRequest
-
-