use of net.openid.conformance.condition.PreEnvironment in project conformance-suite by openid-certification.
the class RemoveSHashFromIdToken method evaluate.
@Override
@PreEnvironment(required = "id_token_claims")
@PostEnvironment(required = "id_token_claims")
public Environment evaluate(Environment env) {
JsonObject claims = env.getObject("id_token_claims");
claims.remove("s_hash");
env.putObject("id_token_claims", claims);
logSuccess("Removed s_hash value from ID token claims", args("id_token_claims", claims));
return env;
}
use of net.openid.conformance.condition.PreEnvironment in project conformance-suite by openid-certification.
the class RemoveSubFromIdToken method evaluate.
@Override
@PreEnvironment(required = "id_token_claims")
@PostEnvironment(required = "id_token_claims")
public Environment evaluate(Environment env) {
JsonObject claims = env.getObject("id_token_claims");
claims.remove("sub");
env.putObject("id_token_claims", claims);
log("Removed sub value from ID token claims", args("id_token_claims", claims));
return env;
}
use of net.openid.conformance.condition.PreEnvironment in project conformance-suite by openid-certification.
the class SendAuthorizationResponseWithResponseModeQuery method evaluate.
@Override
@PreEnvironment(required = CreateAuthorizationEndpointResponseParams.ENV_KEY)
@PostEnvironment(strings = "authorization_endpoint_response_redirect")
public Environment evaluate(Environment env) {
JsonObject params = env.getObject(CreateAuthorizationEndpointResponseParams.ENV_KEY);
String redirectUri = OIDFJSON.getString(params.remove("redirect_uri"));
UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(redirectUri);
for (String paramName : params.keySet()) {
builder.queryParam(paramName, OIDFJSON.getString(params.get(paramName)));
}
String redirectTo = builder.toUriString();
log("Redirecting back to client", args("uri", redirectTo));
env.putString("authorization_endpoint_response_redirect", redirectTo);
return env;
}
use of net.openid.conformance.condition.PreEnvironment in project conformance-suite by openid-certification.
the class SetTokenEndpointAuthMethodsSupportedToPrivateKeyJWTOnly method evaluate.
@Override
@PreEnvironment(required = "server")
@PostEnvironment(required = "server")
public Environment evaluate(Environment env) {
JsonArray data = new JsonArray();
data.add("private_key_jwt");
JsonObject server = env.getObject("server");
server.add("token_endpoint_auth_methods_supported", data);
env.putObject("server", server);
log("Changed token_endpoint_auth_methods_supported to private_key_jwt only in server configuration", args("server_configuration", server));
return env;
}
use of net.openid.conformance.condition.PreEnvironment in project conformance-suite by openid-certification.
the class SetTokenEndpointAuthMethodsSupportedToTlsClientAuthOnly method evaluate.
@Override
@PreEnvironment(required = "server")
@PostEnvironment(required = "server")
public Environment evaluate(Environment env) {
JsonArray data = new JsonArray();
data.add("tls_client_auth");
JsonObject server = env.getObject("server");
server.add("token_endpoint_auth_methods_supported", data);
env.putObject("server", server);
log("Changed token_endpoint_auth_methods_supported to tls_client_auth only in server configuration", args("server_configuration", server));
return env;
}
Aggregations