Search in sources :

Example 1 with Saml2TokenCreationState

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);
    }
}
Also used : SAML2SubjectConfirmation(org.forgerock.openam.sts.token.SAML2SubjectConfirmation) Saml2TokenCreationState(org.forgerock.openam.sts.rest.token.provider.saml.Saml2TokenCreationState) Saml2RestTokenProviderParameters(org.forgerock.openam.sts.rest.operation.translate.Saml2RestTokenProviderParameters) ProofTokenState(org.forgerock.openam.sts.user.invocation.ProofTokenState)

Aggregations

Saml2RestTokenProviderParameters (org.forgerock.openam.sts.rest.operation.translate.Saml2RestTokenProviderParameters)1 Saml2TokenCreationState (org.forgerock.openam.sts.rest.token.provider.saml.Saml2TokenCreationState)1 SAML2SubjectConfirmation (org.forgerock.openam.sts.token.SAML2SubjectConfirmation)1 ProofTokenState (org.forgerock.openam.sts.user.invocation.ProofTokenState)1