use of org.opensaml.saml.metadata.resolver.RoleDescriptorResolver in project cas by apereo.
the class SamlObjectSignatureValidator method verifySamlProfileRequestIfNeeded.
/**
* Verify saml profile request if needed.
*
* @param profileRequest the profile request
* @param resolver the resolver
* @param request the request
* @param context the context
* @throws Exception the exception
*/
public void verifySamlProfileRequestIfNeeded(final RequestAbstractType profileRequest, final MetadataResolver resolver, final HttpServletRequest request, final MessageContext context) throws Exception {
final RoleDescriptorResolver roleDescriptorResolver = getRoleDescriptorResolver(resolver, context, profileRequest);
LOGGER.debug("Validating signature for [{}]", profileRequest.getClass().getName());
final Signature signature = profileRequest.getSignature();
if (signature != null) {
validateSignatureOnProfileRequest(profileRequest, signature, roleDescriptorResolver);
} else {
validateSignatureOnAuthenticationRequest(profileRequest, request, context, roleDescriptorResolver);
}
}
Aggregations