1 /*
2 * ========================================================================
3 *
4 * Licensed to the Apache Software Foundation (ASF) under one or more
5 * contributor license agreements. See the NOTICE file distributed with
6 * this work for additional information regarding copyright ownership.
7 * The ASF licenses this file to You under the Apache License, Version 2.0
8 * (the "License"); you may not use this file except in compliance with
9 * the License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 *
19 * ========================================================================
20 */
21 package org.apache.cactus.client.authentication;
22
23 import org.apache.cactus.WebRequest;
24 import org.apache.cactus.internal.configuration.Configuration;
25 import org.apache.commons.httpclient.HttpMethod;
26 import org.apache.commons.httpclient.HttpState;
27
28 /**
29 * Interface for different authentication modules. An authentication class is
30 * invoked on the client side to perform the actual authentication, for example
31 * by modifying the request to includes credentials.
32 *
33 * @since 1.5
34 *
35 * @version $Id: Authentication.java 238991 2004-05-22 11:34:50Z vmassol $
36 */
37 public interface Authentication
38 {
39
40 /**
41 * Modifies the request so that it will carry authentication information.
42 *
43 * @param theState The HttpClient state object that can be used to ask
44 * HttpClient to set up authentication
45 * @param theMethod the HttpClient HTTP method that will be used to connect
46 * to the server side
47 * @param theRequest The request object that will be sent to the Cactus
48 * Redirector over HTTP
49 * @param theConfiguration The Cactus configuration so that
50 * authentication methods can get access to Cactus configuration
51 * properties
52 */
53 void configure(HttpState theState, HttpMethod theMethod,
54 WebRequest theRequest, Configuration theConfiguration);
55
56 }