View Javadoc

    1   // ========================================================================
    2   // $Id: ObjectCallback.java 305 2006-03-07 10:32:14Z janb $
    3   // Copyright 2003-2004 Mort Bay Consulting Pty. Ltd.
    4   // ------------------------------------------------------------------------
    5   // Licensed under the Apache License, Version 2.0 (the "License");
    6   // you may not use this file except in compliance with the License.
    7   // You may obtain a copy of the License at
    8   // http://www.apache.org/licenses/LICENSE-2.0
    9   // 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  /* ---------------------------------------------------- */
    22  /** ObjectCallback
    23   *
    24   * <p>Can be used as a LoginModule Callback to
    25   * obtain a user's credential as an Object, rather than
    26   * a char[], to which some credentials may not be able
    27   * to be converted
    28   *
    29   * <p><h4>Notes</h4>
    30   * <p>
    31   *
    32   * <p><h4>Usage</h4>
    33   * <pre>
    34   */
    35  /*
    36   * </pre>
    37   *
    38   * @see
    39   * @version 1.0 Tue Apr 15 2003
    40   * @author Jan Bartel (janb)
    41   */
    42  public class ObjectCallback implements Callback
    43  {
    44
    45      protected Object _object;
    46
    47      public void setObject(Object o)
    48      {
    49          _object = o;
    50      }
    51
    52      public Object getObject ()
    53      {
    54          return _object;
    55      }
    56
    57
    58      public void clearObject ()
    59      {
    60          _object = null;
    61      }
    62
    63
    64  }