import org.opensaml.saml1.core.Conditions;
import org.opensaml.saml1.core.ConfirmationMethod;
import org.opensaml.saml1.core.NameIdentifier;
-import org.opensaml.saml1.core.Request;
import org.opensaml.saml1.core.RequestAbstractType;
import org.opensaml.saml1.core.Response;
import org.opensaml.saml1.core.ResponseAbstractType;
import edu.internet2.middleware.shibboleth.common.attribute.encoding.AttributeEncodingException;
import edu.internet2.middleware.shibboleth.common.attribute.encoding.SAML1NameIdentifierEncoder;
import edu.internet2.middleware.shibboleth.common.attribute.provider.SAML1AttributeAuthority;
-import edu.internet2.middleware.shibboleth.common.attribute.provider.ShibbolethSAMLAttributeRequestContext;
import edu.internet2.middleware.shibboleth.common.log.AuditLogEntry;
import edu.internet2.middleware.shibboleth.common.profile.ProfileException;
import edu.internet2.middleware.shibboleth.common.relyingparty.provider.saml1.AbstractSAML1ProfileConfiguration;
import edu.internet2.middleware.shibboleth.idp.profile.AbstractSAMLProfileHandler;
-import edu.internet2.middleware.shibboleth.idp.session.ServiceInformation;
-import edu.internet2.middleware.shibboleth.idp.session.Session;
/** Common implementation details for profile handlers. */
public abstract class AbstractSAML1ProfileHandler extends AbstractSAMLProfileHandler {
*
* @throws ProfileException thrown if the major version of the SAML request is not 1
*/
- protected void checkSamlVersion(BaseSAML1ProfileRequestContext<?,?,?> requestContext) throws ProfileException {
+ protected void checkSamlVersion(BaseSAML1ProfileRequestContext<?, ?, ?> requestContext) throws ProfileException {
SAMLObject samlObject = requestContext.getInboundSAMLMessage();
if (samlObject instanceof RequestAbstractType) {
*
* @throws ProfileException thrown if there is a problem creating the SAML response
*/
- protected Response buildResponse(BaseSAML1ProfileRequestContext<?,?,?> requestContext, List<Statement> statements)
+ protected Response buildResponse(BaseSAML1ProfileRequestContext<?, ?, ?> requestContext, List<Statement> statements)
throws ProfileException {
DateTime issueInstant = new DateTime();
*
* @return the built assertion
*/
- protected Assertion buildAssertion(BaseSAML1ProfileRequestContext<?,?,?> requestContext, DateTime issueInstant) {
+ protected Assertion buildAssertion(BaseSAML1ProfileRequestContext<?, ?, ?> requestContext, DateTime issueInstant) {
Assertion assertion = assertionBuilder.buildObject();
assertion.setID(getIdGenerator().generateIdentifier());
assertion.setIssueInstant(issueInstant);
*
* @return constructed conditions
*/
- protected Conditions buildConditions(BaseSAML1ProfileRequestContext<?,?,?> requestContext, DateTime issueInstant) {
+ protected Conditions buildConditions(BaseSAML1ProfileRequestContext<?, ?, ?> requestContext, DateTime issueInstant) {
AbstractSAML1ProfileConfiguration profileConfig = requestContext.getProfileConfiguration();
Conditions conditions = conditionsBuilder.buildObject();
* @throws ProfileException thrown if a NameID can not be created either because there was a problem encoding the
* name ID attribute or because there are no supported name formats
*/
- protected Subject buildSubject(BaseSAML1ProfileRequestContext<?,?,?> requestContext, String confirmationMethod)
+ protected Subject buildSubject(BaseSAML1ProfileRequestContext<?, ?, ?> requestContext, String confirmationMethod)
throws ProfileException {
NameIdentifier nameID = buildNameId(requestContext);
- requestContext.setSubjectNameID(nameID);
+ requestContext.setSubjectNameIdentifier(nameID);
ConfirmationMethod method = confirmationMethodBuilder.buildObject();
method.setConfirmationMethod(confirmationMethod);
* @throws ProfileException thrown if a NameIdentifier can not be created either because there was a problem
* encoding the name ID attribute or because there are no supported name formats
*/
- protected NameIdentifier buildNameId(BaseSAML1ProfileRequestContext<?,?,?> requestContext) throws ProfileException {
+ protected NameIdentifier buildNameId(BaseSAML1ProfileRequestContext<?, ?, ?> requestContext)
+ throws ProfileException {
if (log.isDebugEnabled()) {
log.debug("Building assertion NameIdentifier to relying party " + requestContext.getRelyingPartyEntityId()
+ " for principal " + requestContext.getPrincipalName());
*
* @throws ProfileException thrown if there is a problem determing the NameIdentifier format to use
*/
- protected List<String> getNameFormats(BaseSAML1ProfileRequestContext<?,?,?> requestContext) throws ProfileException {
+ protected List<String> getNameFormats(BaseSAML1ProfileRequestContext<?, ?, ?> requestContext)
+ throws ProfileException {
ArrayList<String> nameFormats = new ArrayList<String>();
RoleDescriptor assertingPartyRole = requestContext.getAssertingPartyRoleMetadata();
*
* @return the constructed error response
*/
- protected Response buildErrorResponse(BaseSAML1ProfileRequestContext<?,?,?> requestContext) {
+ protected Response buildErrorResponse(BaseSAML1ProfileRequestContext<?, ?, ?> requestContext) {
Response samlResponse = responseBuilder.buildObject();
samlResponse.setIssueInstant(new DateTime());
populateStatusResponse(requestContext, samlResponse);
* @param requestContext current request context
* @param response the response to populate
*/
- protected void populateStatusResponse(BaseSAML1ProfileRequestContext<?,?,?> requestContext, ResponseAbstractType response) {
+ protected void populateStatusResponse(BaseSAML1ProfileRequestContext<?, ?, ?> requestContext,
+ ResponseAbstractType response) {
response.setID(getIdGenerator().generateIdentifier());
SAMLObject samlMessage = requestContext.getInboundSAMLMessage();
*
* @throws ProfileException thrown if attributes can not be resolved
*/
- protected void resolveAttributes(BaseSAML1ProfileRequestContext<?,?,?> requestContext) throws ProfileException {
+ protected void resolveAttributes(BaseSAML1ProfileRequestContext<?, ?, ?> requestContext) throws ProfileException {
AbstractSAML1ProfileConfiguration profileConfiguration = requestContext.getProfileConfiguration();
SAML1AttributeAuthority attributeAuthority = profileConfiguration.getAttributeAuthority();
log.debug("Resolving attributes for principal " + requestContext.getPrincipalName()
+ " of SAML request from relying party " + requestContext.getRelyingPartyEntityId());
}
- Map<String, BaseAttribute> principalAttributes = attributeAuthority
- .getAttributes(buildAttributeRequestContext(requestContext));
+ Map<String, BaseAttribute> principalAttributes = attributeAuthority.getAttributes(requestContext);
requestContext.setPrincipalAttributes(principalAttributes);
} catch (AttributeRequestException e) {
*
* @throws ProfileException thrown if there is a problem making the query
*/
- protected AttributeStatement buildAttributeStatement(BaseSAML1ProfileRequestContext<?,?,?> requestContext,
+ protected AttributeStatement buildAttributeStatement(BaseSAML1ProfileRequestContext<?, ?, ?> requestContext,
String subjectConfMethod) throws ProfileException {
if (log.isDebugEnabled()) {
try {
AttributeStatement statment;
if (requestContext.getInboundSAMLMessage() instanceof AttributeQuery) {
- statment = attributeAuthority.buildAttributeStatement((AttributeQuery) requestContext.getInboundSAMLMessage(),
- requestContext.getPrincipalAttributes().values());
+ statment = attributeAuthority.buildAttributeStatement((AttributeQuery) requestContext
+ .getInboundSAMLMessage(), requestContext.getPrincipalAttributes().values());
} else {
statment = attributeAuthority.buildAttributeStatement(null, requestContext.getPrincipalAttributes()
.values());
*
* @throws ProfileException thrown if the principal name can not be resolved
*/
- protected void resolvePrincipal(BaseSAML1ProfileRequestContext<?,?,?> requestContext) throws ProfileException {
+ protected void resolvePrincipal(BaseSAML1ProfileRequestContext<?, ?, ?> requestContext) throws ProfileException {
AbstractSAML1ProfileConfiguration profileConfiguration = requestContext.getProfileConfiguration();
SAML1AttributeAuthority attributeAuthority = profileConfiguration.getAttributeAuthority();
}
try {
- String principal = attributeAuthority.getPrincipal(buildAttributeRequestContext(requestContext));
+ String principal = attributeAuthority.getPrincipal(requestContext);
requestContext.setPrincipalName(principal);
} catch (AttributeRequestException e) {
log.error("Error resolving attributes for SAML request from relying party "
}
/**
- * Creates an attribute query context from the current profile request context.
- *
- * @param requestContext current profile request
- *
- * @return created query context
- */
- protected ShibbolethSAMLAttributeRequestContext<NameIdentifier, AttributeQuery> buildAttributeRequestContext(
- BaseSAML1ProfileRequestContext<?,?,?> requestContext) {
-
- ShibbolethSAMLAttributeRequestContext<NameIdentifier, AttributeQuery> queryContext;
-
- if (requestContext.getInboundSAMLMessage() instanceof Request) {
- Request samlRequest = (Request) requestContext.getInboundSAMLMessage();
- queryContext = new ShibbolethSAMLAttributeRequestContext<NameIdentifier, AttributeQuery>(
- getMetadataProvider(), requestContext.getRelyingPartyConfiguration(), samlRequest
- .getAttributeQuery());
- } else {
- queryContext = new ShibbolethSAMLAttributeRequestContext<NameIdentifier, AttributeQuery>(
- getMetadataProvider(), requestContext.getRelyingPartyConfiguration(), null);
- }
-
- queryContext.setAttributeRequester(requestContext.getAssertingPartyEntityId());
- queryContext.setPrincipalName(requestContext.getPrincipalName());
- queryContext.setProfileConfiguration(requestContext.getProfileConfiguration());
- queryContext.setRequest(requestContext.getProfileRequest());
-
- Session userSession = getSessionManager().getSession(getUserSessionId(requestContext.getProfileRequest()));
- if (userSession != null) {
- queryContext.setUserSession(userSession);
- ServiceInformation serviceInfo = userSession.getServicesInformation().get(
- requestContext.getRelyingPartyEntityId());
- if (serviceInfo != null) {
- String principalAuthenticationMethod = serviceInfo.getAuthenticationMethod().getAuthenticationMethod();
-
- requestContext.setPrincipalAuthenticationMethod(principalAuthenticationMethod);
- queryContext.setPrincipalAuthenticationMethod(principalAuthenticationMethod);
- }
- }
-
- return queryContext;
- }
-
- /**
* Signs the given assertion if either the current profile configuration or the relying party configuration contains
* signing credentials.
*
* @throws ProfileException thrown if the metadata can not be located for the relying party or, if signing is
* required, if a signing credential is not configured
*/
- protected void signAssertion(BaseSAML1ProfileRequestContext<?,?,?> requestContext, Assertion assertion)
+ protected void signAssertion(BaseSAML1ProfileRequestContext<?, ?, ?> requestContext, Assertion assertion)
throws ProfileException {
if (log.isDebugEnabled()) {
log.debug("Determining if SAML assertion to relying party " + requestContext.getRelyingPartyEntityId()
*
* @param context current request context
*/
- protected void writeAuditLogEntry(BaseSAML1ProfileRequestContext<?,?,?> context) {
+ protected void writeAuditLogEntry(BaseSAML1ProfileRequestContext<?, ?, ?> context) {
AuditLogEntry auditLogEntry = new AuditLogEntry();
auditLogEntry.setMessageProfile(getProfileId());
auditLogEntry.setPrincipalAuthenticationMethod(context.getPrincipalAuthenticationMethod());
auditLogEntry.setPrincipalName(context.getPrincipalName());
auditLogEntry.setAssertingPartyId(context.getAssertingPartyEntityId());
auditLogEntry.setRelyingPartyId(context.getRelyingPartyEntityId());
- auditLogEntry.setRequestBinding(context.getMessageDecoder());
+ auditLogEntry.setRequestBinding(getMessageDecoder().getBindingURI());
auditLogEntry.setRequestId(null);
- auditLogEntry.setResponseBinding(context.getMessageEncoder());
+ auditLogEntry.setResponseBinding(getMessageEncoder().getBindingURI());
auditLogEntry.setResponseId(context.getOutboundSAMLMessageId());
if (context.getReleasedPrincipalAttributeIds() != null) {
auditLogEntry.getReleasedAttributes().addAll(context.getReleasedPrincipalAttributeIds());
import org.opensaml.saml1.core.ResponseAbstractType;
import org.opensaml.saml1.core.Status;
-import edu.internet2.middleware.shibboleth.common.attribute.provider.ShibbolethSAMLAttributeRequestContext;
-import edu.internet2.middleware.shibboleth.common.profile.provider.BaseShibbolethProfileRequestContext;
+import edu.internet2.middleware.shibboleth.common.profile.provider.BaseSAMLProfileRequestContext;
import edu.internet2.middleware.shibboleth.common.relyingparty.provider.saml1.AbstractSAML1ProfileConfiguration;
/**
* @param <ProfileConfigurationType> configuration type for this profile
*/
public abstract class BaseSAML1ProfileRequestContext<RequestType extends RequestAbstractType, ResponseType extends ResponseAbstractType, ProfileConfigurationType extends AbstractSAML1ProfileConfiguration>
- extends BaseShibbolethProfileRequestContext<RequestType, ResponseType, ProfileConfigurationType>
- implements ShibbolethSAMLAttributeRequestContext<NameIdentifier, RequestType, ResponseType, ProfileConfigurationType> {
+ extends BaseSAMLProfileRequestContext<RequestType, ResponseType, NameIdentifier, ProfileConfigurationType> {
/** The request failure status. */
private Status failureStatus;
import java.util.List;
import java.util.Map;
-import javax.servlet.ServletRequest;
-
import org.apache.log4j.Logger;
import org.joda.time.DateTime;
-import org.opensaml.common.SAMLObject;
import org.opensaml.common.SAMLObjectBuilder;
import org.opensaml.common.SAMLVersion;
import org.opensaml.common.impl.SAMLObjectContentReference;
import org.opensaml.saml2.core.Issuer;
import org.opensaml.saml2.core.NameID;
import org.opensaml.saml2.core.ProxyRestriction;
-import org.opensaml.saml2.core.RequestAbstractType;
import org.opensaml.saml2.core.Response;
import org.opensaml.saml2.core.Statement;
import org.opensaml.saml2.core.Status;
import edu.internet2.middleware.shibboleth.common.attribute.encoding.AttributeEncodingException;
import edu.internet2.middleware.shibboleth.common.attribute.encoding.SAML2NameIDAttributeEncoder;
import edu.internet2.middleware.shibboleth.common.attribute.provider.SAML2AttributeAuthority;
-import edu.internet2.middleware.shibboleth.common.attribute.provider.ShibbolethSAMLAttributeRequestContext;
import edu.internet2.middleware.shibboleth.common.log.AuditLogEntry;
import edu.internet2.middleware.shibboleth.common.profile.ProfileException;
-import edu.internet2.middleware.shibboleth.common.relyingparty.ProfileConfiguration;
import edu.internet2.middleware.shibboleth.common.relyingparty.provider.saml2.AbstractSAML2ProfileConfiguration;
import edu.internet2.middleware.shibboleth.idp.profile.AbstractSAMLProfileHandler;
-import edu.internet2.middleware.shibboleth.idp.session.ServiceInformation;
-import edu.internet2.middleware.shibboleth.idp.session.Session;
/** Common implementation details for profile handlers. */
public abstract class AbstractSAML2ProfileHandler extends AbstractSAMLProfileHandler {
*
* @throws ProfileException thrown if the major version of the SAML request is not 2
*/
- protected void checkSamlVersion(BaseSAML2ProfileRequestContext<?,?,?> requestContext) throws ProfileException {
+ protected void checkSamlVersion(BaseSAML2ProfileRequestContext<?, ?, ?> requestContext) throws ProfileException {
SAMLVersion version = requestContext.getInboundSAMLMessage().getVersion();
if (version.getMajorVersion() < 2) {
requestContext.setFailureStatus(buildStatus(StatusCode.VERSION_MISMATCH_URI,
*
* @throws ProfileException thrown if there is a problem creating the SAML response
*/
- protected Response buildResponse(BaseSAML2ProfileRequestContext<?,?,?> requestContext, String subjectConfirmationMethod,
- List<Statement> statements) throws ProfileException {
+ protected Response buildResponse(BaseSAML2ProfileRequestContext<?, ?, ?> requestContext,
+ String subjectConfirmationMethod, List<Statement> statements) throws ProfileException {
DateTime issueInstant = new DateTime();
*
* @return the built assertion
*/
- protected Assertion buildAssertion(BaseSAML2ProfileRequestContext<?,?,?> requestContext, DateTime issueInstant) {
+ protected Assertion buildAssertion(BaseSAML2ProfileRequestContext<?, ?, ?> requestContext, DateTime issueInstant) {
Assertion assertion = assertionBuilder.buildObject();
assertion.setID(getIdGenerator().generateIdentifier());
assertion.setIssueInstant(issueInstant);
*
* @return the built issuer
*/
- protected Issuer buildEntityIssuer(BaseSAML2ProfileRequestContext<?,?,?> requestContext) {
+ protected Issuer buildEntityIssuer(BaseSAML2ProfileRequestContext<?, ?, ?> requestContext) {
Issuer issuer = issuerBuilder.buildObject();
issuer.setFormat(Issuer.ENTITY);
issuer.setValue(requestContext.getAssertingPartyEntityId());
*
* @return constructed conditions
*/
- protected Conditions buildConditions(BaseSAML2ProfileRequestContext<?,?,?> requestContext, DateTime issueInstant) {
+ protected Conditions buildConditions(BaseSAML2ProfileRequestContext<?, ?, ?> requestContext, DateTime issueInstant) {
AbstractSAML2ProfileConfiguration profileConfig = requestContext.getProfileConfiguration();
Conditions conditions = conditionsBuilder.buildObject();
* @param requestContext current request context
* @param response the response to populate
*/
- protected void populateStatusResponse(BaseSAML2ProfileRequestContext<?,?,?> requestContext, StatusResponseType response) {
+ protected void populateStatusResponse(BaseSAML2ProfileRequestContext<?, ?, ?> requestContext,
+ StatusResponseType response) {
response.setID(getIdGenerator().generateIdentifier());
if (requestContext.getInboundSAMLMessage() != null) {
response.setInResponseTo(requestContext.getInboundSAMLMessageId());
response.setVersion(SAMLVersion.VERSION_20);
response.setIssuer(buildEntityIssuer(requestContext));
}
-
+
/**
* Resolves the attributes for the principal.
*
*
* @throws ProfileException thrown if there is a problem resolved attributes
*/
- protected void resolveAttributes(BaseSAML2ProfileRequestContext<?,?,?> requestContext) throws ProfileException{
+ protected void resolveAttributes(BaseSAML2ProfileRequestContext<?, ?, ?> requestContext) throws ProfileException {
AbstractSAML2ProfileConfiguration profileConfiguration = requestContext.getProfileConfiguration();
SAML2AttributeAuthority attributeAuthority = profileConfiguration.getAttributeAuthority();
+ " of SAML request " + requestContext.getInboundSAMLMessageId() + " from relying party "
+ requestContext.getRelyingPartyEntityId());
}
- Map<String, BaseAttribute> principalAttributes = attributeAuthority
- .getAttributes(buildAttributeRequestContext(requestContext));
+ Map<String, BaseAttribute> principalAttributes = attributeAuthority.getAttributes(requestContext);
requestContext.setPrincipalAttributes(principalAttributes);
} catch (AttributeRequestException e) {
*
* @throws ProfileException thrown if there is a problem making the query
*/
- protected AttributeStatement buildAttributeStatement(BaseSAML2ProfileRequestContext<?,?,?> requestContext)
+ protected AttributeStatement buildAttributeStatement(BaseSAML2ProfileRequestContext<?, ?, ?> requestContext)
throws ProfileException {
if (log.isDebugEnabled()) {
log.debug("Creating attribute statement in response to SAML request "
SAML2AttributeAuthority attributeAuthority = profileConfiguration.getAttributeAuthority();
try {
if (requestContext.getInboundSAMLMessage() instanceof AttributeQuery) {
- return attributeAuthority.buildAttributeStatement((AttributeQuery) requestContext.getInboundSAMLMessage(),
- requestContext.getPrincipalAttributes().values());
+ return attributeAuthority.buildAttributeStatement((AttributeQuery) requestContext
+ .getInboundSAMLMessage(), requestContext.getPrincipalAttributes().values());
} else {
- return attributeAuthority.buildAttributeStatement(null, requestContext.getPrincipalAttributes().values());
+ return attributeAuthority.buildAttributeStatement(null, requestContext.getPrincipalAttributes()
+ .values());
}
} catch (AttributeRequestException e) {
log.error("Error encoding attributes for principal " + requestContext.getPrincipalName(), e);
requestContext.setFailureStatus(buildStatus(StatusCode.RESPONDER_URI, null, "Error resolving attributes"));
- throw new ProfileException("Error encoding attributes for principal " + requestContext.getPrincipalName(), e);
+ throw new ProfileException("Error encoding attributes for principal " + requestContext.getPrincipalName(),
+ e);
}
}
*
* @throws ProfileException thrown if the principal name can not be resolved
*/
- protected void resolvePrincipal(BaseSAML2ProfileRequestContext<RequestAbstractType, StatusResponseType, AbstractSAML2ProfileConfiguration> requestContext) throws ProfileException {
+ protected void resolvePrincipal(BaseSAML2ProfileRequestContext<?, ?, ?> requestContext) throws ProfileException {
AbstractSAML2ProfileConfiguration profileConfiguration = requestContext.getProfileConfiguration();
if (profileConfiguration == null) {
log.error("Unable to resolve principal, no SAML 2 profile configuration for relying party "
SAML2AttributeAuthority attributeAuthority = profileConfiguration.getAttributeAuthority();
if (log.isDebugEnabled()) {
- log.debug("Resolving principal name for subject of SAML request " + requestContext.getInboundSAMLMessageId()
- + " from relying party " + requestContext.getRelyingPartyEntityId());
+ log.debug("Resolving principal name for subject of SAML request "
+ + requestContext.getInboundSAMLMessageId() + " from relying party "
+ + requestContext.getRelyingPartyEntityId());
}
try {
* @throws ProfileException thrown if the metadata can not be located for the relying party or, if signing is
* required, if a signing credential is not configured
*/
- protected void signAssertion(BaseSAML2ProfileRequestContext<?,?,?> requestContext, Assertion assertion)
+ protected void signAssertion(BaseSAML2ProfileRequestContext<?, ?, ?> requestContext, Assertion assertion)
throws ProfileException {
if (log.isDebugEnabled()) {
log.debug("Determining if SAML assertion to relying party " + requestContext.getRelyingPartyEntityId()
* @throws ProfileException thrown if a NameID can not be created either because there was a problem encoding the
* name ID attribute or because there are no supported name formats
*/
- protected Subject buildSubject(BaseSAML2ProfileRequestContext<?,?,?> requestContext, String confirmationMethod,
+ protected Subject buildSubject(BaseSAML2ProfileRequestContext<?, ?, ?> requestContext, String confirmationMethod,
DateTime issueInstant) throws ProfileException {
NameID nameID = buildNameId(requestContext);
- requestContext.setSubjectNameID(nameID);
+ requestContext.setSubjectNameIdentifier(nameID);
// TODO handle encryption
SubjectConfirmationData confirmationData = subjectConfirmationDataBuilder.buildObject();
* @throws ProfileException thrown if a NameID can not be created either because there was a problem encoding the
* name ID attribute or because there are no supported name formats
*/
- protected NameID buildNameId(BaseSAML2ProfileRequestContext<?,?,?> requestContext) throws ProfileException {
+ protected NameID buildNameId(BaseSAML2ProfileRequestContext<?, ?, ?> requestContext) throws ProfileException {
if (log.isDebugEnabled()) {
log.debug("Building assertion NameID for principal/relying party:" + requestContext.getPrincipalName()
+ "/" + requestContext.getRelyingPartyEntityId());
*
* @throws ProfileException thrown if there is a problem determing the NameID format to use
*/
- protected List<String> getNameFormats(BaseSAML2ProfileRequestContext<?,?,?> requestContext) throws ProfileException {
+ protected List<String> getNameFormats(BaseSAML2ProfileRequestContext<?, ?, ?> requestContext)
+ throws ProfileException {
ArrayList<String> nameFormats = new ArrayList<String>();
List<String> assertingPartySupportedFormats = getEntitySupportedFormats(requestContext
*
* @return the constructed error response
*/
- protected Response buildErrorResponse(BaseSAML2ProfileRequestContext<?,?,?> requestContext) {
+ protected Response buildErrorResponse(BaseSAML2ProfileRequestContext<?, ?, ?> requestContext) {
Response samlResponse = responseBuilder.buildObject();
samlResponse.setIssueInstant(new DateTime());
populateStatusResponse(requestContext, samlResponse);
*
* @param context current request context
*/
- protected void writeAuditLogEntry(BaseSAML2ProfileRequestContext<?,?,?> context) {
+ protected void writeAuditLogEntry(BaseSAML2ProfileRequestContext<?, ?, ?> context) {
AuditLogEntry auditLogEntry = new AuditLogEntry();
auditLogEntry.setMessageProfile(getProfileId());
auditLogEntry.setPrincipalAuthenticationMethod(context.getPrincipalAuthenticationMethod());
import org.opensaml.saml2.core.Status;
import org.opensaml.saml2.core.StatusResponseType;
-import edu.internet2.middleware.shibboleth.common.attribute.provider.ShibbolethSAMLAttributeRequestContext;
-import edu.internet2.middleware.shibboleth.common.profile.provider.BaseShibbolethProfileRequestContext;
+import edu.internet2.middleware.shibboleth.common.profile.provider.BaseSAMLProfileRequestContext;
import edu.internet2.middleware.shibboleth.common.relyingparty.provider.saml2.AbstractSAML2ProfileConfiguration;
/**
* @param <ProfileConfigurationType> configuration type for this profile
*/
public abstract class BaseSAML2ProfileRequestContext<RequestType extends RequestAbstractType, ResponseType extends StatusResponseType, ProfileConfigurationType extends AbstractSAML2ProfileConfiguration>
- extends BaseShibbolethProfileRequestContext<RequestType, ResponseType, ProfileConfigurationType>
- implements ShibbolethSAMLAttributeRequestContext<NameID, RequestType, ResponseType, ProfileConfigurationType> {
+ extends BaseSAMLProfileRequestContext<RequestType, ResponseType, NameID, ProfileConfigurationType> {
/** The request failure status. */
private Status failureStatus;