KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > security > auth > callback > ObjectCallback


1 /*
2  * JBoss, the OpenSource WebOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.security.auth.callback;
8
9 import javax.security.auth.callback.Callback JavaDoc;
10
11 /** An implementation of Callback that simply obtains an Object to be used
12 as the authentication credential. Interpretation of the Object is up to
13 the LoginModules that validate the credential.
14
15 @author Scott.Stark@jboss.org
16 @version $Revision: 1.4 $
17 */

18 public class ObjectCallback implements Callback JavaDoc
19 {
20     private transient String JavaDoc prompt;
21     private transient Object JavaDoc credential;
22
23     /** Initialize the SecurityAssociationCallback
24     */

25     public ObjectCallback(String JavaDoc prompt)
26     {
27         this.prompt = prompt;
28     }
29
30     public String JavaDoc getPrompt()
31     {
32         return prompt;
33     }
34     public Object JavaDoc getCredential()
35     {
36         return credential;
37     }
38     public void setCredential(Object JavaDoc credential)
39     {
40         this.credential = credential;
41     }
42     public void clearCredential()
43     {
44         this.credential = null;
45     }
46 }
47
48
Popular Tags