com.ibm.websphere.security.auth.callback
Class WSCredTokenCallbackImpl
- java.lang.Object
com.ibm.websphere.security.auth.callback.WSCredTokenCallbackImpl
- public class WSCredTokenCallbackImpl
- extends java.lang.Object
- implements javax.security.auth.callback.Callback
The WSCredTokenCallbackImpl
allows credential token to be gathered by
CallbackHandler
and pass it to the LoginModule
.
However, credential token usually is in byte format, it is very error prone and
difficult to type it in. It usually pass to the LoginModule
programmatically.
Constructor Summary
Constructor and Description |
---|
WSCredTokenCallbackImpl(java.lang.String prompt)
Construct a
WSCredTokenCallbackImpl object with a prompt hint.
|
WSCredTokenCallbackImpl(java.lang.String prompt,byte[] defaultCredToken)
Construct a
WSCredTokenCallbackImpl object with a prompt hint and
a default credential token.
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
getCredToken()
Return the credential token.
|
|
getDefaultCredToken()
Return the default credential token.
|
|
getPrompt()
Return the prompt.
|
|
setCredToken(byte[] credToken)
Set the credential token.
|
|
toString()
Returns the name of the Callback.
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail
WSCredTokenCallbackImpl
- public WSCredTokenCallbackImpl( java.lang.String prompt)
prompt
- The prompt hint. WSCredTokenCallbackImpl
- public WSCredTokenCallbackImpl( java.lang.String prompt,
- byte[] defaultCredToken)
Construct a WSCredTokenCallbackImpl
object with a prompt hint and
a default credential token.
prompt
- The prompt hint. defaultCredToken
- The default credential token. Method Detail
setCredToken
- public void setCredToken(byte[] credToken)
Set the credential token.
credToken
- The credential token. getCredToken
- public byte[] getCredToken()
Return the credential token. If the credential token set in
WSCredTokenCallbackImpl.setCredToken()
is null
, the null
is returned.
null
. getDefaultCredToken
- public byte[] getDefaultCredToken( )
Return the default credential token. If the credential token set in
Constructor is null
, then null
is returned.
null
. getPrompt
- public java.lang.String getPrompt( )
Return the prompt. If the prompt set in Constructor
is null
, then null
is returned.
null
. toString
- public java.lang.String toString( )
Returns the name of the Callback. Typically, it is the name of the class.
toString
in class java.lang.Object
Construct a
WSCredTokenCallbackImpl
object with a prompt hint.