View Javadoc

    1   //========================================================================
    2   //$Id: RequestParameterCallback.java 305 2006-03-07 10:32:14Z janb $
    3   //Copyright 2000-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 java.util.List;
    19
    20  import javax.security.auth.callback.Callback;
    21
    22
    23  /**
    24   *
    25   * RequestParameterCallback
    26   *
    27   * Allows a JAAS callback handler to access any parameter from the j_security_check FORM.
    28   * This means that a LoginModule can access form fields other than the j_username and j_password
    29   * fields, and use it, for example, to authenticate a user.
    30   *
    31   * @author janb
    32   * @version $Revision: 305 $ $Date: 2006-03-07 21:32:14 +1100 (Tue, 07 Mar 2006) $
    33   *
    34   */
    35  public class RequestParameterCallback implements Callback
    36  {
    37      private String paramName;
    38      private List paramValues;
    39
    40      public void setParameterName (String name)
    41      {
    42          paramName = name;
    43      }
    44      public String getParameterName ()
    45      {
    46          return paramName;
    47      }
    48
    49      public void setParameterValues (List values)
    50      {
    51          paramValues = values;
    52      }
    53
    54      public List getParameterValues ()
    55      {
    56          return paramValues;
    57      }
    58  }