use of org.forgerock.selfservice.stages.tokenhandlers.JwtTokenHandler in project OpenAM by OpenRock.
the class JwtSnapshotTokenHandlerFactory method configureJwtTokenHandler.
private SnapshotTokenHandler configureJwtTokenHandler(JwtTokenHandlerConfig config) {
SigningManager signingManager = new SigningManager();
SigningHandler signingHandler = signingManager.newHmacSigningHandler(config.getSharedKey());
KeyPair keyPair = provider.getKeyPair(config.getKeyPairAlgorithm(), config.getKeyPairSize());
return new JwtTokenHandler(config.getJweAlgorithm(), config.getEncryptionMethod(), keyPair, config.getJwsAlgorithm(), signingHandler, config.getTokenLifeTimeInSeconds());
}
Aggregations