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.saml2;
19 import org.joda.time.DateTime;
20 import org.opensaml.saml2.core.AttributeStatement;
21 import org.opensaml.saml2.core.SubjectQuery;
23 import edu.internet2.middleware.shibboleth.common.profile.ProfileRequest;
26 * Contains contextual information used in processing profile responses.
28 public class ProfileResponseContext {
30 /** Profile request. */
31 private ProfileRequest request;
33 /** Profile request message. */
34 private SubjectQuery message;
36 /** Response issuer. */
37 private String issuer;
39 /** Response destination. */
40 private String destination;
42 /** Provider id to retrieve relying party configuration. */
43 private String providerId;
45 /** Issue instant for the response. */
46 private DateTime issueInstant;
48 /** Response statement. */
49 private AttributeStatement attributeStatement;
54 * @param r serlvet request
55 * @param m decoded profile request message
58 public ProfileResponseContext(ProfileRequest r, SubjectQuery m) {
61 providerId = m.getIssuer().getSPProvidedID();
62 issueInstant = new DateTime();
66 * Gets the initiating profile request.
68 * @return profile request
70 public ProfileRequest getRequest() {
75 * Gets the decoded profile request message.
77 * @return profile request message
79 public SubjectQuery getMessage() {
84 * Gets the provider id.
88 public String getProviderId() {
93 * Gets the issue instant for the response.
95 * @return issue instant
97 public DateTime getIssueInstant() {
102 * Sets an issuer associated with this response.
106 public void setIssuer(String i) {
111 * Gets the issuer associated with this response.
115 public String getIssuer() {
120 * Sets a destination associated with this response.
124 public void setDestination(String d) {
129 * Gets the destination associated with this response.
131 * @return destination
133 public String getDestination() {
138 * Sets a attribute statement associated with this response.
142 public void setAttributeStatement(AttributeStatement s) {
143 attributeStatement = s;
147 * Gets the statement associated with this response.
149 * @return response statement
151 public AttributeStatement getAttributeStatement() {
152 return attributeStatement;