KickJava   Java API By Example, From Geeks To Geeks.

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


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 java.security.Principal JavaDoc;
10 import javax.security.auth.callback.Callback JavaDoc;
11
12
13 /** An implementation of Callback useful on the server side for
14 propagating the request Principal and credentials to LoginModules.
15
16 @author Scott.Stark@jboss.org
17 @version $Revision: 1.2 $
18 */

19 public class SecurityAssociationCallback implements Callback JavaDoc
20 {
21     private transient Principal JavaDoc principal;
22     private transient Object JavaDoc credential;
23
24     /** Initialize the SecurityAssociationCallback
25     */

26     public SecurityAssociationCallback()
27     {
28     }
29
30     public Principal JavaDoc getPrincipal()
31     {
32         return principal;
33     }
34     public void setPrincipal(Principal JavaDoc principal)
35     {
36         this.principal = principal;
37     }
38
39     public Object JavaDoc getCredential()
40     {
41         return credential;
42     }
43     public void setCredential(Object JavaDoc credential)
44     {
45         this.credential = credential;
46     }
47     public void clearCredential()
48     {
49         this.credential = null;
50     }
51 }
52
53
Popular Tags