public class WSCcacheCallBackHandlerImpl
extends java.lang.Object
implements javax.security.auth.callback.CallbackHandler
The WSCcacheCallBackHandlerImpl
gathers the authentication data from the
contructor and push them throughs to the login module. These data includes
Kerberos principal name, Kerberos realm name, Kerberos credential cache file name and use the default
Kerberos credential cache.
Supported Callback
s:
javax.security.auth.callback.NameCallback
com.ibm.websphere.security.auth.callback.WSRealmNameCallbackImpl
javax.security.auth.callback.TextInputCallback
.
The text to be used as the Kerberos credential cache fully qualified file name.
javax.security.auth.callback.TextInputCallback
.
The text to be used as the use default Kerberos credential cache.
NOTE: In order to use the Kerberos credential cache, You must set all options to false in the WSKRB5Login module entry in the wsjaas_client.conf file.
NameCallback
,
PasswordCallback
,
TextInputCallback
Constructor and Description |
---|
WSCcacheCallBackHandlerImpl()
Constructor with no parameters.
|
WSCcacheCallBackHandlerImpl(java.lang.String userid,
java.lang.String realmName,
java.lang.String ccacheFile,
java.lang.String defaultCcache)
Constructs a
WSCcacheCallBackHandlerImpl using userid , realmName , ccacheFile
and defaultCcache parameters. |
Modifier and Type | Method and Description |
---|---|
void |
handle(javax.security.auth.callback.Callback[] callbacks)
This implementation of
WSCcacheCallBackHandlerImpl collects the Kerberos principal name, Kerberos realm name,
Kerberos credential cache file name, and use default Kerberos credential cache data
supplied via the constructor
and pushes them to the login module. |
public WSCcacheCallBackHandlerImpl()
public WSCcacheCallBackHandlerImpl(java.lang.String userid, java.lang.String realmName, java.lang.String ccacheFile, java.lang.String defaultCcache)
WSCcacheCallBackHandlerImpl
using userid
, realmName
, ccacheFile
and defaultCcache
parameters.userid
- The Kerberos user name.realmName
- The Kerberos realm name.ccacheFile
- The Kerberos credential cache file name. The value is an URL, FILE:<user specific directory and file name>.
For example: 'FILE:/utle/krb5cc_utle'.
If you want to use the default Kerberos credential cache, then this parameter can be null.defaultCcache - The default Kerberos credential cache. It's a string value of either 'true' or 'false'.
If defaultCcache is 'true', the default Kerberos credential cache will be used.
The default cache is located in the following order: NOTE: If defaultCcache is 'true' while the default Kerberos credential cache is invalid/missing/expired, or userid=null, the WSKrb5Login will attempt to use Microsoft native credentials if the running platform is Windows.
public void handle(javax.security.auth.callback.Callback[] callbacks) throws java.io.IOException, javax.security.auth.callback.UnsupportedCallbackException
WSCcacheCallBackHandlerImpl
collects the Kerberos principal name, Kerberos realm name,
Kerberos credential cache file name, and use default Kerberos credential cache data
supplied via the constructor
and pushes them to the login module. If the realm name can not determined or
null, a "<default>" realm name will be displayed.handle
in interface javax.security.auth.callback.CallbackHandler
callbacks
- An array of Callback
objects provided by the underlying
security service which contains the information
requested to be retrieved or displayed.java.io.IOException
- If an input or output error occurs.javax.security.auth.callback.UnsupportedCallbackException
- If the implementation of this method does not support one or more of the
Callback
s specified in the callbacks parameter.