View Javadoc

1   // ========================================================================
2   // Copyright (c) 2003-2009 Mort Bay Consulting Pty. Ltd.
3   // ------------------------------------------------------------------------
4   // All rights reserved. This program and the accompanying materials
5   // are made available under the terms of the Eclipse Public License v1.0
6   // and Apache License v2.0 which accompanies this distribution.
7   // The Eclipse Public License is available at 
8   // http://www.eclipse.org/legal/epl-v10.html
9   // The Apache License v2.0 is available at
10  // http://www.opensource.org/licenses/apache2.0.php
11  // You may elect to redistribute this code under either of these licenses. 
12  // ========================================================================
13  
14  package org.eclipse.jetty.plus.jaas.callback;
15  
16  import javax.security.auth.callback.Callback;
17  
18  
19  /* ---------------------------------------------------- */
20  /** ObjectCallback
21   *
22   * <p>Can be used as a LoginModule Callback to
23   * obtain a user's credential as an Object, rather than
24   * a char[], to which some credentials may not be able
25   * to be converted
26   *
27   * <p><h4>Notes</h4>
28   * <p>
29   *
30   * <p><h4>Usage</h4>
31   * <pre>
32   */
33  /*
34   * </pre>
35   *
36   * @see
37   * @version 1.0 Tue Apr 15 2003
38   * 
39   */
40  public class ObjectCallback implements Callback
41  {
42  
43      protected Object _object;
44      
45      public void setObject(Object o)
46      {
47          _object = o;
48      }
49  
50      public Object getObject ()
51      {
52          return _object;
53      }
54  
55  
56      public void clearObject ()
57      {
58          _object = null;
59      }
60      
61      
62  }