/** {@inheritDoc} */ protected void marshallAttributes(XMLObject samlObject, Element domElement) throws MarshallingException { RequestedAuthnContext rac = (RequestedAuthnContext) samlObject; if (rac.getComparison() != null) { domElement.setAttributeNS(null, RequestedAuthnContext.COMPARISON_ATTRIB_NAME, rac.getComparison() .toString()); } } }
/** * Gets authentication context by assertion. * This is more of a template method for the time being, * and may be enhanced later to support more advanced parsing of classes * from the assertion. * * @param assertion the assertion * @param requestedAuthnContext the requested authn context * @param authnContextClassRefs the authn context class refs * @return the authentication context by assertion */ protected String getAuthenticationContextByAssertion(final Object assertion, final RequestedAuthnContext requestedAuthnContext, final List<AuthnContextClassRef> authnContextClassRefs) { LOGGER.debug("AuthN Context comparison is requested to use [{}]", requestedAuthnContext.getComparison()); authnContextClassRefs.forEach(c -> LOGGER.debug("Requested AuthN Context [{}]", c.getAuthnContextClassRef())); return null; } }
protected RequestedAuthenticationContext getRequestedAuthenticationContext(AuthnRequest request) { RequestedAuthenticationContext result = null; if (request.getRequestedAuthnContext() != null) { AuthnContextComparisonTypeEnumeration comparison = request.getRequestedAuthnContext().getComparison(); if (null != comparison) { result = RequestedAuthenticationContext.valueOf(comparison.toString()); } } return result; }
if (requestedCtx.getComparison() != null) { rpCtx.setOperator(requestedCtx.getComparison().toString()); } else { rpCtx.setOperator(AuthnContextComparisonTypeEnumeration.EXACT.toString());