comparison servlet/src/digilib/auth/AuthOps.java @ 1:0ff3ede32060

Initial revision
author robcast
date Thu, 17 Jan 2002 15:25:46 +0100
parents
children 300d5ba8b33b 9cedd170b581
comparison
equal deleted inserted replaced
0:ffd2df307e81 1:0ff3ede32060
1 /* AuthOps -- Authentication interface class
2
3 Digital Image Library servlet components
4
5 Copyright (C) 2001, 2002 Robert Casties (robcast@mail.berlios.de)
6
7 This program is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 2 of the License, or (at your
10 option) any later version.
11
12 Please read license.txt for the full details. A copy of the GPL
13 may be found at http://www.gnu.org/copyleft/lgpl.html
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
19 */
20
21 package digilib.auth;
22
23
24 import java.io.*;
25 import java.util.*;
26 import javax.servlet.http.*;
27
28 public interface AuthOps {
29
30 /**
31 * check if the request must be authorized to access filepath
32 */
33 public boolean isAuthRequired(String filepath, HttpServletRequest request) throws AuthOpException;
34
35 /**
36 * check if the request is allowed to access filepath
37 */
38 public boolean isAuthorized(String filepath, HttpServletRequest request) throws AuthOpException;
39
40 /**
41 * return a list of authorization roles needed for request
42 * to access the specified path
43 * (does not look at request address for now)
44 */
45 public List rolesForPath(String filepath, HttpServletRequest request) throws AuthOpException;
46
47 /**
48 * check request authorization against a list of roles
49 */
50 public boolean isRoleAuthorized(List roles, HttpServletRequest request);
51
52 }