01: // ========================================================================
02: // $Id: ObjectCallback.java 305 2006-03-07 10:32:14Z janb $
03: // Copyright 2003-2004 Mort Bay Consulting Pty. Ltd.
04: // ------------------------------------------------------------------------
05: // Licensed under the Apache License, Version 2.0 (the "License");
06: // you may not use this file except in compliance with the License.
07: // You may obtain a copy of the License at
08: // http://www.apache.org/licenses/LICENSE-2.0
09: // Unless required by applicable law or agreed to in writing, software
10: // distributed under the License is distributed on an "AS IS" BASIS,
11: // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: // See the License for the specific language governing permissions and
13: // limitations under the License.
14: // ========================================================================
15:
16: package org.mortbay.jetty.plus.jaas.callback;
17:
18: import javax.security.auth.callback.Callback;
19:
20: /* ---------------------------------------------------- */
21: /** ObjectCallback
22: *
23: * <p>Can be used as a LoginModule Callback to
24: * obtain a user's credential as an Object, rather than
25: * a char[], to which some credentials may not be able
26: * to be converted
27: *
28: * <p><h4>Notes</h4>
29: * <p>
30: *
31: * <p><h4>Usage</h4>
32: * <pre>
33: */
34: /*
35: * </pre>
36: *
37: * @see
38: * @version 1.0 Tue Apr 15 2003
39: * @author Jan Bartel (janb)
40: */
41: public class ObjectCallback implements Callback {
42:
43: protected Object _object;
44:
45: public void setObject(Object o) {
46: _object = o;
47: }
48:
49: public Object getObject() {
50: return _object;
51: }
52:
53: public void clearObject() {
54: _object = null;
55: }
56:
57: }
|