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