01: /*
02: * Copyright 2005-2006 The Kuali Foundation.
03: *
04: *
05: * Licensed under the Educational Community License, Version 1.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: *
09: * http://www.opensource.org/licenses/ecl1.php
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package edu.iu.uis.eden.web;
18:
19: import javax.servlet.http.HttpServletRequest;
20:
21: import edu.iu.uis.eden.web.session.UserSession;
22:
23: /**
24: * A service which is used to authenticate web users from an Http request.
25: *
26: * @author ewestfal
27: * @author rkirkend
28: */
29: public interface WebAuthenticationService {
30:
31: /**
32: * Determines who the authenticated user is by examining the given HttpServiceRequest.
33: *
34: * @param request the HttpServletRequest which should contain user authentication information.
35: * @return the network id of the authenticated user, this id should corresond to a user with
36: * that AuthenticationUserId in the UserService
37: */
38: public String getNetworkId(HttpServletRequest request);
39:
40: /**
41: * Update the UserSession with any new information. This method is invoked on entry into every page in the system
42: * after the UserSession has been established and can be used to set up initial or subsequent authentications
43: * on the UserSession object with additional information from the request if necessary. It can also be used
44: * to swap out implementations of the UserSession if the implementing application should deem it necessary.
45: *
46: * @return the updated UserSession
47: */
48: public UserSession updateUserSession(UserSession userSession,
49: HttpServletRequest request);
50:
51: }
|