use of net.openid.conformance.condition.PostEnvironment in project conformance-suite by openid-certification.
the class AddFAPIInteractionIdToResourceEndpointRequest method evaluate.
@Override
@PreEnvironment(strings = "fapi_interaction_id", required = "resource_endpoint_request_headers")
@PostEnvironment(required = "resource_endpoint_request_headers")
public Environment evaluate(Environment env) {
JsonObject headers = env.getObject("resource_endpoint_request_headers");
String interactionId = env.getString("fapi_interaction_id");
headers.addProperty("x-fapi-interaction-id", interactionId);
logSuccess("Added x-fapi-interaction-id to resource endpoint request headers", args("resource_endpoint_request_headers", headers));
return env;
}
use of net.openid.conformance.condition.PostEnvironment in project conformance-suite by openid-certification.
the class AddDpopHeaderForTokenEndpointRequest method evaluate.
@Override
@PreEnvironment(strings = "dpop_proof")
@PostEnvironment(required = "token_endpoint_request_headers")
public Environment evaluate(Environment env) {
String dpopProof = env.getString("dpop_proof");
JsonObject headers = env.getObject("token_endpoint_request_headers");
if (headers == null) {
headers = new JsonObject();
env.putObject("token_endpoint_request_headers", headers);
}
headers.addProperty("DPoP", dpopProof);
logSuccess("Set DPoP header", args("DPoP", dpopProof));
return env;
}
use of net.openid.conformance.condition.PostEnvironment in project conformance-suite by openid-certification.
the class AddAuthReqIdToTokenEndpointRequest method evaluate.
@Override
@PreEnvironment(required = { "token_endpoint_request_form_parameters", "backchannel_authentication_endpoint_response" })
@PostEnvironment(required = "token_endpoint_request_form_parameters")
public Environment evaluate(Environment env) {
JsonObject o = env.getObject("token_endpoint_request_form_parameters");
final String authReqId = env.getString("backchannel_authentication_endpoint_response", "auth_req_id");
if (authReqId == null) {
throw error("auth_req_id missing from backchannel_authentication_endpoint_response");
}
o.addProperty("auth_req_id", authReqId);
env.putObject("token_endpoint_request_form_parameters", o);
log(o);
return env;
}
use of net.openid.conformance.condition.PostEnvironment in project conformance-suite by openid-certification.
the class AddFrontchannelLogoutUriToDynamicRegistrationRequest method evaluate.
@Override
@PreEnvironment(required = "dynamic_registration_request", strings = "frontchannel_logout_uri")
@PostEnvironment(required = "dynamic_registration_request")
public Environment evaluate(Environment env) {
String frontchannelLogoutUri = env.getString("frontchannel_logout_uri");
JsonObject dynamicRegistrationRequest = env.getObject("dynamic_registration_request");
dynamicRegistrationRequest.addProperty("frontchannel_logout_uri", frontchannelLogoutUri);
env.putObject("dynamic_registration_request", dynamicRegistrationRequest);
log("Added frontchannel_logout_uri to dynamic registration request", args("dynamic_registration_request", dynamicRegistrationRequest));
return env;
}
use of net.openid.conformance.condition.PostEnvironment in project conformance-suite by openid-certification.
the class AddIdTokenSigningAlgNoneToDynamicRegistrationRequest method evaluate.
@Override
@PreEnvironment(required = "dynamic_registration_request")
@PostEnvironment(required = "dynamic_registration_request")
public Environment evaluate(Environment env) {
JsonObject dynamicRegistrationRequest = env.getObject("dynamic_registration_request");
dynamicRegistrationRequest.addProperty("id_token_signed_response_alg", "none");
env.putObject("dynamic_registration_request", dynamicRegistrationRequest);
log("Added id_token_signed_response_alg to dynamic registration request", args("dynamic_registration_request", dynamicRegistrationRequest));
return env;
}
Aggregations