2 * Copyright [2007] [University Corporation for Advanced Internet Development, Inc.]
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package edu.internet2.middleware.shibboleth.idp.profile;
19 import javax.servlet.http.HttpServletRequest;
21 import org.opensaml.common.binding.MessageDecoder;
23 import edu.internet2.middleware.shibboleth.common.profile.ProfileRequest;
24 import edu.internet2.middleware.shibboleth.common.relyingparty.RelyingPartyConfiguration;
25 import edu.internet2.middleware.shibboleth.common.relyingparty.RelyingPartyManager;
26 import edu.internet2.middleware.shibboleth.common.session.SessionManager;
27 import edu.internet2.middleware.shibboleth.idp.session.Session;
30 * Shibboleth {@link ProfileRequest}.
32 public class ShibbolethProfileRequest implements ProfileRequest<HttpServletRequest, Session> {
34 /** The in comming request. */
35 private HttpServletRequest rawRequest;
37 /** Configuration information for the requesting party. */
38 private RelyingPartyConfiguration rpConfiguration;
40 /** The current user session. */
41 private Session userSession;
46 * @param request the incomming HTTP request
47 * @param decoder the decoder for the request, all information but the request must be set already
48 * @param sessionManager the manager of current user sessions
49 * @param rpConfigManager the relying party configuration manager
51 public ShibbolethProfileRequest(HttpServletRequest request, MessageDecoder<HttpServletRequest> decoder,
52 SessionManager<Session> sessionManager, RelyingPartyManager rpConfigManager){
55 userSession = sessionManager.getSession(request.getSession().getId());
59 public HttpServletRequest getRawRequest() {
64 public RelyingPartyConfiguration getRelyingPartyConfiguration() {
65 return rpConfiguration;
69 public Session getSession() {