KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > catalina > Auditor


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the "License"). You may not use this file except
5  * in compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * glassfish/bootstrap/legal/CDDLv1.0.txt or
9  * https://glassfish.dev.java.net/public/CDDLv1.0.html.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * HEADER in each file and include the License file at
15  * glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable,
16  * add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your
18  * own identifying information: Portions Copyright [yyyy]
19  * [name of copyright owner]
20  *
21  * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
22  */

23  
24
25 package org.apache.catalina;
26
27
28 /**
29  * Defines interface of classes which implement audit functionality.
30  *
31  * <P>An <b>Auditor</b> class can be registered with a Context and
32  * will receive notification of all auditable events processed by the
33  * Authenticator of that context.
34  *
35  * <P> IASRI 4823322
36  *
37  * @author Jyri J. Virkki
38  * @version $Revision: 1.2 $
39  *
40  */

41
42 public interface Auditor
43 {
44     
45     /**
46      * Notify auditor of an authentication event.
47      *
48      * <P>This method will get invoked on every login attempt whether
49      * it was approved or denied by the authentication infrastructure.
50      *
51      * @param user the user for whom authentication was processed
52      * @param realm the realm which handled the authentication
53      * @param succcess true if the authentication succeeded, false if denied
54      *
55      */

56     public void authentication(String JavaDoc user, String JavaDoc realm, boolean success);
57
58     
59     /**
60      * Notify auditor of a servlet container invocation.
61      *
62      * <P>This method will get invoked on every request whether it
63      * was permitted or not by the authorization infrastructure.
64      *
65      * @param req the HttpRequest
66      * @param success true if the invocation was allowed, false if denied.
67      *
68      */

69     public void webInvocation(HttpRequest req, boolean success);
70
71     
72 }
73
Popular Tags