public class KerberosLoginModule extends Object implements LoginModule
LoginModule that wraps the JDK supplied module and has the additional capability of adding a
GSSCredential to the populated Subject| Modifier and Type | Field and Description |
|---|---|
static String |
ADD_GSS_CREDENTIAL
Module option to enable adding a
GSSCredential to the private credentials of the populated Subject. |
static String |
CREDENTIAL_LIFETIME
The lifetime in seconds of the
GSSCredential, a negative value will set this to GSSCredential.INDEFINITE_LIFETIME. |
static String |
DELEGATION_CREDENTIAL
Module option to configure how this
LoginModule handles delegation credentials. |
static String |
WRAP_GSS_CREDENTIAL
Module option to specify if any
GSSCredential being added to the Subject should be wrapped to prevent disposal. |
| Constructor and Description |
|---|
KerberosLoginModule() |
public static final String DELEGATION_CREDENTIAL
LoginModule handles delegation credentials.
IGNORE - (Default) Do not use the delegation credential, just perform normal Kerberos authentication.
USE - If a GSSCredential is available use it to populate the Subject, if it is not available
fall back to standard Kerberos authentication.
REQUIRE - Require that a GSSCredential is available and use it to populate the Subject, if it is
not available then fail authentication.public static final String ADD_GSS_CREDENTIAL
GSSCredential to the private credentials of the populated Subject.
Defaults to false.public static final String WRAP_GSS_CREDENTIAL
GSSCredential being added to the Subject should be wrapped to prevent disposal.
Has no effect if a GSSCredential is not being added to the Subject.
Defaults to false.public static final String CREDENTIAL_LIFETIME
GSSCredential, a negative value will set this to GSSCredential.INDEFINITE_LIFETIME.
Defaults to GSSCredential.DEFAULT_LIFETIMEpublic void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)
initialize in interface LoginModulepublic boolean login()
throws LoginException
login in interface LoginModuleLoginExceptionpublic boolean commit()
throws LoginException
commit in interface LoginModuleLoginExceptionpublic boolean abort()
throws LoginException
abort in interface LoginModuleLoginExceptionpublic boolean logout()
throws LoginException
logout in interface LoginModuleLoginExceptionCopyright © 2018 JBoss by Red Hat. All rights reserved.