Class WSCredTokenCallbackImpl
- java.lang.Object
- 
- com.ibm.websphere.security.auth.callback.WSCredTokenCallbackImpl
 
- 
- All Implemented Interfaces:
- javax.security.auth.callback.Callback
 
 public class WSCredTokenCallbackImpl extends java.lang.Object implements javax.security.auth.callback.CallbackThe WSCredTokenCallbackImplallows credential token to be gathered byCallbackHandlerand pass it to theLoginModule.However, credential token usually is in byte format, it is very error prone and difficult to type it in. It usually pass to the LoginModuleprogrammatically.- Since:
- 1.0
 
- 
- 
Constructor SummaryConstructors Constructor Description WSCredTokenCallbackImpl(java.lang.String prompt)Construct aWSCredTokenCallbackImplobject with a prompt hint.WSCredTokenCallbackImpl(java.lang.String prompt, byte[] defaultCredToken)Construct aWSCredTokenCallbackImplobject with a prompt hint and a default credential token.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getCredToken()Return the credential token.byte[]getDefaultCredToken()Return the default credential token.java.lang.StringgetPrompt()Return the prompt.voidsetCredToken(byte[] credToken)Set the credential token.java.lang.StringtoString()Returns the name of the Callback.
 
- 
- 
- 
Constructor Detail- 
WSCredTokenCallbackImplpublic WSCredTokenCallbackImpl(java.lang.String prompt) Construct a WSCredTokenCallbackImplobject with a prompt hint.- Parameters:
- prompt- The prompt hint.
 
 - 
WSCredTokenCallbackImplpublic WSCredTokenCallbackImpl(java.lang.String prompt, byte[] defaultCredToken)Construct a WSCredTokenCallbackImplobject with a prompt hint and a default credential token.- Parameters:
- prompt- The prompt hint.
- defaultCredToken- The default credential token.
 
 
- 
 - 
Method Detail- 
setCredTokenpublic void setCredToken(byte[] credToken) Set the credential token. - Parameters:
- credToken- The credential token.
 
 - 
getCredTokenpublic byte[] getCredToken() Return the credential token. If the credential token set in WSCredTokenCallbackImpl.setCredToken()isnull, thenullis returned.- Returns:
- The credential token, could be null.
 
 - 
getDefaultCredTokenpublic byte[] getDefaultCredToken() Return the default credential token. If the credential token set in Constructor is null, thennullis returned.- Returns:
- The default credential token, could be null.
 
 - 
getPromptpublic java.lang.String getPrompt() Return the prompt. If the prompt set in Constructor is null, thennullis returned.- Returns:
- The prompt, could be null.
 
 - 
toStringpublic java.lang.String toString() Returns the name of the Callback. Typically, it is the name of the class. - Overrides:
- toStringin class- java.lang.Object
- Returns:
- The name of the Callback.
 
 
- 
 
-