use of io.jans.ca.common.response.POJOResponse in project jans by JanssenProject.
the class ValidateOperation method execute.
@Override
public IOpResponse execute(ValidateParams params) throws Exception {
validateParams(params);
Rp rp = getRp();
OpenIdConfigurationResponse discoveryResponse = getDiscoveryService().getConnectDiscoveryResponseByRpId(params.getRpId());
final Jwt idToken = Jwt.parse(params.getIdToken());
final Validator validator = new Validator.Builder().discoveryResponse(discoveryResponse).idToken(idToken).keyService(getKeyService()).opClientFactory(getOpClientFactory()).rpServerConfiguration(getConfigurationService().getConfiguration()).rp(rp).build();
validator.validateNonce(getStateService());
validator.validateIdToken(rp.getClientId());
validator.validateAccessToken(params.getAccessToken());
validator.validateAuthorizationCode(params.getCode());
return new POJOResponse("");
}
Aggregations