|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.genesyslab.platform.commons.protocol.auth.KerberosTicketAcquirer
public class KerberosTicketAcquirer
Kerberos-specific implementation of AuthTicketAcquirer
. Can be used by applications to get
Kerberos tickets to other services.
Note: useGss
by default set to true,
to change its default value to false you should set system property
com.genesys.protocol.auth.kerberos.nogss to any not empty value
Note: ticketCached
by default set to true,
to change its default value to false you should set system property
com.genesys.protocol.auth.kerberos.nocache to any not empty value
Note: Java GSS requires a Kerberos configuration file. The default name and location of
the Kerberos configuration file depends on the operating system being used. Java GSS uses the
following order to search for the default configuration file:
Constructor Summary | |
---|---|
KerberosTicketAcquirer()
Create KerberosTicketAcquirer class instance for acquiring current user authentication data. |
|
KerberosTicketAcquirer(java.util.Map<java.lang.String,java.lang.String> kerberosOptions)
Create KerberosTicketAcquirer class instance for acquiring current user authentication data with specified Kerberos options. |
|
KerberosTicketAcquirer(java.lang.String userPrincipalName,
javax.security.auth.callback.CallbackHandler callbackHandler)
Create KerberosTicketAcquirer class instance for acquiring a user authentication data according to UPN(user principal name) and callbackhandler. |
|
KerberosTicketAcquirer(java.lang.String userPrincipalName,
javax.security.auth.callback.CallbackHandler callbackHandler,
java.util.Map<java.lang.String,java.lang.String> kerberosOptions)
Create KerberosTicketAcquirer class instance for acquiring a user authentication data according to UPN(user principal name) and callback handler with specified Kerberos options. |
Method Summary | |
---|---|
AuthTicket |
acquireTicket(java.lang.String servicePrincipalName)
Acquires authentication ticket for a given SPN. |
java.util.Map<java.lang.String,java.lang.String> |
getKerberosOptions()
Gets copy of Krb5LoginModule options used, never returns null. |
java.lang.String |
getUserPrincipalName()
Gets user principal name. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public KerberosTicketAcquirer() throws javax.security.auth.login.LoginException
javax.security.auth.login.LoginException
- if there was error setting up security context, ticket cache is not
accessible or provided credentials are not accepted.public KerberosTicketAcquirer(java.lang.String userPrincipalName, javax.security.auth.callback.CallbackHandler callbackHandler) throws javax.security.auth.login.LoginException
userPrincipalName
- User Principal Name of an entity requesting ticket, in a format
user@REALM
.
Can be null, in this case user that is currently logged in is implied.callbackHandler
- Instance of a CallbackHandler implementation that would be used to get
user login and password information in case Kerberos login module
is not able to access ticket cache. Can be null, in this case if cache
is not accessible, LoginException would be thrown.
javax.security.auth.login.LoginException
- if there was error setting up security context, ticket cache is not
accessible or provided credentials are not accepted.
java.lang.IllegalArgumentException
- if User Principal Name is null or callback handler is null.public KerberosTicketAcquirer(java.util.Map<java.lang.String,java.lang.String> kerberosOptions) throws javax.security.auth.login.LoginException
javax.security.auth.login.LoginException
- if there was error setting up security context, ticket cache is not
accessible or provided credentials are not accepted.public KerberosTicketAcquirer(java.lang.String userPrincipalName, javax.security.auth.callback.CallbackHandler callbackHandler, java.util.Map<java.lang.String,java.lang.String> kerberosOptions) throws javax.security.auth.login.LoginException
userPrincipalName
- User Principal Name of an entity requesting ticket, in a format
user@REALM
.callbackHandler
- Instance of a CallbackHandler implementation that would be used to get
user login and password information in case Kerberos login module
is not able to access ticket cache. Can be null, in this case if cache
is not accessible, LoginException would be thrown.kerberosOptions
-
javax.security.auth.login.LoginException
- if there was error setting up security context, ticket cache is not
accessible or provided credentials are not accepted.Method Detail |
---|
public java.lang.String getUserPrincipalName()
public java.util.Map<java.lang.String,java.lang.String> getKerberosOptions()
Krb5LoginModule
options used, never returns null.
Krb5LoginModule
options used, never returns null.public AuthTicket acquireTicket(java.lang.String servicePrincipalName) throws AuthTicketAcquirerException
AuthTicketAcquirer
acquireTicket
in interface AuthTicketAcquirer
servicePrincipalName
- Principal name of the service for which to get a ticket.
Must not be null or empty.
AuthTicketAcquirerException
- if ticket could not be acquired.public java.lang.String toString()
toString
in class java.lang.Object
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |