KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > security > auth > message > config > ServerAuthConfig


1 /*
2   * JBoss, Home of Professional Open Source
3   * Copyright 2005, JBoss Inc., and individual contributors as indicated
4   * by the @authors tag. See the copyright.txt in the distribution for a
5   * full listing of individual contributors.
6   *
7   * This is free software; you can redistribute it and/or modify it
8   * under the terms of the GNU Lesser General Public License as
9   * published by the Free Software Foundation; either version 2.1 of
10   * the License, or (at your option) any later version.
11   *
12   * This software is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15   * Lesser General Public License for more details.
16   *
17   * You should have received a copy of the GNU Lesser General Public
18   * License along with this software; if not, write to the Free
19   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21   */

22 package javax.security.auth.message.config;
23
24 import java.util.Map JavaDoc;
25
26 import javax.security.auth.message.AuthException;
27
28 /**
29  * <p>This interface describes a configuration of ServerAuthConfiguration
30  * objects for a message layer and application context (e.g., the messaging
31  * context of a specific application, or set of applications).</p>
32  * <p>Implementations of this interface are returned by an AnthConfigProvider. </p>
33  * <p>Callers interact with a ServerAuthConfig to obtain ServerAuthContext
34  * objects suitable for processing a given message exchange at the layer and
35  * within the application context of the ServerAuthConfig. Each ServerAuthContext
36  * object is responsible for instantiating, initializing, and invoking the one
37  * or more ServerAuthModules encapsulated in the ServerAuthContext.</p>
38  * <p>After having acquired a ServerAuthContext, a caller operates on the context
39  * to cause it to invoke the encapsulated ServerAuthModules to validate service
40  * requests and to secure service responses.</p>
41  *
42  * @author <a HREF="mailto:Anil.Saldhana@jboss.org">Anil Saldhana</a>
43  * @author Charlie Lai, Ron Monzillo (Javadoc for JSR-196)</a>
44  * @since May 12, 2006
45  * @version $Revision: 45179 $
46  */

47 public interface ServerAuthConfig extends AuthConfig
48 {
49    /**
50     * <p>Get a ServerAuthContext instance from this ServerAuthConfig.</p>
51     * <p>The implementation of this method returns a ServerAuthContext instance that
52     * encapsulates the ServerAuthModules used to validate requets and secure responses
53     * associated with the given <i>operation</i>.</p>
54     * <p>Specifically, this method accesses this ServerAuthConfig object with the argument
55     * operation to determine the ServerAuthModules that are to be encapsulated in the
56     * returned ServerAuthContext instance.</p>
57     * <p>The ServerAuthConfig object establishes the request and response MessagePolicy
58     * objects that are passed to the encapsulated modules when they are initialized by
59     * the returned ServerAuthContext instance. It is the modules’ responsibility to
60     * enforce these policies when invoked.</p>
61     *
62     * @param operation an operation identifier used to index the provided config, or null.
63     * This value must be identical to the value returned by the
64     * getOperation method for all AuthParam objects passed to the
65     * validateRequest method of the returned ServerAuthContext.
66     * @param properties a Map object that may be used by the caller to augment the
67     * properties that will be passed to the encapsulated modules at
68     * module initialization. The null value may be passed for this
69     * parameter.
70     * @return a ServerAuthContext instance that encapsulates the ServerAuthModules used
71     * to secure and validate requests/responses associated with the
72     * given operation, or null (indicating that no modules are configured).
73     * @throws AuthException if this operation fails.
74     */

75    public ServerAuthContext getAuthContext(String JavaDoc operation, Map JavaDoc properties)
76    throws AuthException;
77 }
78
Popular Tags