]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
8e78e0076f82af8a9f8062ebe23502131cab0b6d
[tmp/jakarta-migration.git] /
1 /*
2  * To change this template, choose Tools | Templates
3  * and open the template in the editor.
4  */
5
6 package org.collectionspace.hello.services.nuxeo;
7
8
9 import javax.security.auth.callback.Callback;
10
11 /**
12  * Copied from jbossx
13  *
14  * An implementation of Callback that simply obtains an Object to be used
15  * as the authentication credential. Interpretation of the Object is up to
16  * the LoginModules that validate the credential.
17  *
18  * @author  Scott.Stark@jboss.org
19  */
20 public class NuxeoCallback implements Callback {
21
22     private final String prompt;
23
24     private Object credential;
25
26     public NuxeoCallback() {
27         this("");
28     }
29
30     public NuxeoCallback(String prompt) {
31         this.prompt = prompt;
32     }
33
34     public String getPrompt() {
35         return prompt;
36     }
37
38     public Object getCredential() {
39         return credential;
40     }
41
42     public void setCredential(Object credential) {
43         this.credential = credential;
44     }
45
46     public void clearCredential() {
47         credential = null;
48     }
49
50 }