- Common ways to obtain AuthnRequest
private void myMethod () {AuthnRequest a =
SAMLObjectBuilder sAMLObjectBuilder;sAMLObjectBuilder.buildObject()
Function function;Object input;function.apply(input)
- Smart code suggestions by Codota
}
private String[] getAuditResourceFromSamlAuthnRequest(final AuthnRequest returnValue) { val result = new ToStringBuilder(this, ToStringStyle.NO_CLASS_NAME_STYLE) .append("issuer", returnValue.getIssuer().getValue()) .append("binding", returnValue.getProtocolBinding()) .toString(); return new String[]{result}; } }
/** * Determine profile binding. * * @param authenticationContext the authentication context * @param assertion the assertion * @return the string */ protected String determineProfileBinding(final Pair<AuthnRequest, MessageContext> authenticationContext, final Assertion assertion) { val authnRequest = authenticationContext.getKey(); val pair = getRegisteredServiceAndFacade(authnRequest); val facade = pair.getValue(); val binding = StringUtils.defaultIfBlank(authnRequest.getProtocolBinding(), SAMLConstants.SAML2_POST_BINDING_URI); LOGGER.debug("Determined authentication request binding is [{}], issued by [{}]", binding, authnRequest.getIssuer().getValue()); val entityId = facade.getEntityId(); LOGGER.debug("Checking metadata for [{}] to see if binding [{}] is supported", entityId, binding); @NonNull val svc = facade.getAssertionConsumerService(binding); LOGGER.debug("Binding [{}] is supported by [{}]", svc.getBinding(), entityId); return binding; } }
.setIssuer(getIssuer(request.getIssuer())) .setForceAuth(request.isForceAuthn()) .setPassive(request.isPassive())