use of org.forgerock.openam.sts.rest.token.provider.saml.Saml2TokenCreationState in project OpenAM by OpenRock.
the class TokenRequestMarshallerImpl method createSAML2TokenProviderParameters.
private RestTokenProviderParameters<Saml2TokenCreationState> createSAML2TokenProviderParameters(final TokenTypeId inputTokenType, final JsonValue inputToken, final JsonValue desiredToken) throws TokenMarshalException {
final SAML2SubjectConfirmation subjectConfirmation = getSubjectConfirmation(desiredToken);
if (SAML2SubjectConfirmation.HOLDER_OF_KEY.equals(subjectConfirmation)) {
final ProofTokenState proofTokenState = getProofTokenState(desiredToken);
final Saml2TokenCreationState saml2TokenCreationState = new Saml2TokenCreationState(subjectConfirmation, proofTokenState);
return new Saml2RestTokenProviderParameters(saml2TokenCreationState, inputTokenType, inputToken);
} else {
final Saml2TokenCreationState saml2TokenCreationState = new Saml2TokenCreationState(subjectConfirmation);
return new Saml2RestTokenProviderParameters(saml2TokenCreationState, inputTokenType, inputToken);
}
}
Aggregations