/** * This method is used to set Signature to the Response message * @param response Genareated Response including zero or more assertions * @param signatureAlgorithm signature Algorithm * @param digestAlgorithm cryptographic hash algorithm * @param cred X509Credential instance * @return Response response message * @throws IdentitySAML2QueryException If unable to set signature to the response */ public static Response setSignature(Response response, String signatureAlgorithm, String digestAlgorithm, X509Credential cred) throws IdentitySAML2QueryException { try { return (Response) doSetSignature(response, signatureAlgorithm, digestAlgorithm, cred); } catch (IdentityException e) { log.error("Unable to set signature to the response id:"+response.getID(),e); throw new IdentitySAML2QueryException("Unable to set signature to the response id:"+response.getID(),e); } }
/** * Constructs and adds a {@link Assertion} to the given {@link Response}. The {@link Assertion} is constructed * using the parameters supplied, and its issue instant is set to the issue instant of the given {@link Response}. * * @param action the current action * @param response the response to which the assertion will be added * @param idGenerator source of assertion ID * @param issuer value for assertion * * @return the assertion that was added to the response */ @Nonnull public static Assertion addAssertionToResponse(@Nonnull final AbstractProfileAction action, @Nonnull final Response response, @Nonnull final IdentifierGenerationStrategy idGenerator, @Nullable final String issuer) { final Assertion assertion = buildAssertion(action, idGenerator, issuer); assertion.setIssueInstant(response.getIssueInstant()); getLogger().debug("Profile Action {}: Added Assertion {} to Response {}", new Object[] {action.getClass().getSimpleName(), assertion.getID(), response.getID(),}); response.getAssertions().add(assertion); return assertion; }
if (errorResponse.getID() != null) { String errorResponseText = SAMLQueryRequestUtil.marshall((errorResponse)); if (errorResponseText.length() > 0) {
log.debug("Response generated with ID : " + response.getID() + " for the request: " + authnQuery.getID() + " and subject: " + user); return response;
try { response = QueryResponseBuilder.build(assertions, issuerConfig, user); log.debug("Response generated with ID : " + response.getID() + " For the request id:" + query.getID()); } catch (IdentitySAML2QueryException e) {
try { response = QueryResponseBuilder.build(assertionList, issuerConfig, tenantDomain); log.debug("Response generated with ID : " + response.getID() + " for the AssertionIDRequest id:" + assertionIDRequest.getID()); } catch (IdentitySAML2QueryException e) {
try { response = QueryResponseBuilder.build(assertions, issuerConfig, tenantDomain); log.debug("Response generated with ID : " + response.getID() + " for the AttributeRequest Id:" + query.getID()); } catch (IdentitySAML2QueryException e) {
validatorResponse.setResponseId(samlResponse.getID()); validatorResponse.setSessionNotOnOrAfter(sessionNotOnOrAfter); if (samlResponse.getIssueInstant() != null) {
.setConsent(parsed.getConsent()) .setDestination(parsed.getDestination()) .setId(parsed.getID()) .setInResponseTo(parsed.getInResponseTo()) .setIssueInstant(parsed.getIssueInstant())
log.debug("Response generated with ID : " + response.getID() + " for the request id: " + authzDecisionQuery.getID()); } catch (NullPointerException e) {