use of net.openid.conformance.condition.PostEnvironment in project conformance-suite by openid-certification.
the class AddPAREndpointAsAudToRequestObject method evaluate.
@Override
@PreEnvironment(required = { "request_object_claims" })
@PostEnvironment(required = { "request_object_claims" })
public Environment evaluate(Environment env) {
JsonObject authzEndpointRequest = env.getObject("request_object_claims");
String parEndpoint = env.getString("server", "pushed_authorization_request_endpoint");
if (parEndpoint == null) {
throw error("Could not find pushed_authorization_request_endpoint in the server metadata.");
}
authzEndpointRequest.addProperty("aud", parEndpoint);
env.putObject("request_object_claims", authzEndpointRequest);
logSuccess("Added aud to request object claims", args("aud", parEndpoint));
return env;
}
use of net.openid.conformance.condition.PostEnvironment in project conformance-suite by openid-certification.
the class AddPlainErrorResponseAsAuthorizationEndpointResponseForJARM method evaluate.
@Override
@PreEnvironment(required = "callback_query_params")
@PostEnvironment(required = "authorization_endpoint_response")
public Environment evaluate(Environment env) {
JsonObject callbackQueryParams = env.getObject("callback_query_params");
env.mapKey("authorization_endpoint_response", "callback_query_params");
logSuccess("The server returned a plain error response instead of a JARM response", callbackQueryParams);
return env;
}
use of net.openid.conformance.condition.PostEnvironment in project conformance-suite by openid-certification.
the class AddPolicyUriToDynamicRegistrationRequest method evaluate.
@Override
@PreEnvironment(required = "dynamic_registration_request", strings = "policy_uri")
@PostEnvironment(required = "dynamic_registration_request")
public Environment evaluate(Environment env) {
JsonObject dynamicRegistrationRequest = env.getObject("dynamic_registration_request");
String policyUri = env.getString("policy_uri");
dynamicRegistrationRequest.addProperty("policy_uri", policyUri);
env.putObject("dynamic_registration_request", dynamicRegistrationRequest);
log("Added policy_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 AddPostLogoutRedirectUriWithQueryAddedToEndSessionEndpointRequest method evaluate.
@Override
@PreEnvironment(required = "end_session_endpoint_request")
@PostEnvironment(required = "end_session_endpoint_request")
public Environment evaluate(Environment env) {
JsonObject endSessionEndpointRequest = env.getObject("end_session_endpoint_request");
String postLogoutUri = OIDFJSON.getString(endSessionEndpointRequest.get("post_logout_redirect_uri"));
postLogoutUri += "?foo=bar";
endSessionEndpointRequest.addProperty("post_logout_redirect_uri", postLogoutUri);
env.putObject("end_session_endpoint_request", endSessionEndpointRequest);
logSuccess("Added ?foo=bar to post_logout_redirect_uri in end session endpoint request", endSessionEndpointRequest);
return env;
}
use of net.openid.conformance.condition.PostEnvironment in project conformance-suite by openid-certification.
the class AddSoftwareStatementToClientConfigurationRequest method evaluate.
@Override
@PreEnvironment(required = { "registration_client_endpoint_request_body", "software_statement_assertion" })
@PostEnvironment(required = "registration_client_endpoint_request_body")
public Environment evaluate(Environment env) {
JsonObject request = env.getObject("registration_client_endpoint_request_body");
String assertion = env.getString("software_statement_assertion", "value");
request.addProperty("software_statement", assertion);
log("Added software_statement to client configuration request", args("client_configuration_request", request));
return env;
}
Aggregations