/*
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions Copyrighted [year] [name of copyright owner]".
*
* Copyright 2015 ForgeRock AS.
*/
/**
*
*/
public class RestOpenIdConnectTokenProvider extends RestTokenProviderBase<OpenIdConnectTokenCreationState> {
/*
ctor not injected as this class created by TokenTransformFactoryImpl
*/
this.authnContextMapper = authnContextMapper;
}
public JsonValue createToken(RestTokenProviderParameters<OpenIdConnectTokenCreationState> restTokenProviderParameters) throws TokenCreationException {
try {
OpenIdConnectTokenCreationState tokenCreationState = restTokenProviderParameters.getTokenCreationState();
final String authNContextClassRef = authnContextMapper.getAuthnContextClassReference(restTokenProviderParameters.getInputTokenType(),
final Set<String> authenticationMethodReferences = authModeReferencesMapper.getAuthnMethodsReferences(restTokenProviderParameters.getInputTokenType(),
} finally {
try {
amSessionInvalidator.invalidateAMSessions(threadLocalAMTokenCache.getToBeInvalidatedAMSessionIds());
} catch (Exception e) {
String message = "Exception caught invalidating interim AMSession following OpenIdConnect token creation: " + e;
/*
The fact that the interim OpenAM session was not invalidated should not prevent a token from being issued, so
I will not throw an exception.
*/
}
}
}
private String getAssertion(String authNContextClassRef, Set<String> authenticationMethodReferences,
}
}