use of net.openid.conformance.condition.PostEnvironment in project conformance-suite by openid-certification.
the class AddInvalidCHashValueToIdToken method evaluate.
@Override
@PreEnvironment(required = "id_token_claims", strings = "c_hash")
@PostEnvironment(required = "id_token_claims")
public Environment evaluate(Environment env) {
JsonObject claims = env.getObject("id_token_claims");
String hash = env.getString("c_hash");
// Add number 1 onto end of hash string
String concat = (hash + 1);
claims.addProperty("c_hash", concat);
env.putObject("id_token_claims", claims);
logSuccess("Added invalid c_hash to ID token claims", args("id_token_claims", claims, "c_hash", concat));
return env;
}
use of net.openid.conformance.condition.PostEnvironment in project conformance-suite by openid-certification.
the class AddInvalidExpiredExpValueToIdToken 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");
Instant exp = Instant.now().minusSeconds(60 * 6);
claims.addProperty("exp", exp.getEpochSecond());
env.putObject("id_token_claims", claims);
logSuccess("Added expired exp value to ID token claims", args("id_token_claims", claims, "exp", exp));
return env;
}
use of net.openid.conformance.condition.PostEnvironment in project conformance-suite by openid-certification.
the class AddInvalidOpenBankingIntentIdToIdToken method evaluate.
@Override
@PreEnvironment(required = "id_token_claims", strings = "openbanking_intent_id")
@PostEnvironment(required = "id_token_claims")
public Environment evaluate(Environment env) {
JsonObject claims = env.getObject("id_token_claims");
String intent = env.getString("openbanking_intent_id");
// Add number 1 onto end of intent string
String concat = intent + 1;
claims.addProperty("openbanking_intent_id", concat);
env.putObject("id_token_claims", claims);
logSuccess("Added invalid openbanking_intent_id to ID token claims", args("id_token_claims", claims, "openbanking_intent_id", concat));
return env;
}
use of net.openid.conformance.condition.PostEnvironment in project conformance-suite by openid-certification.
the class AddIssToAuthorizationEndpointResponseParams method evaluate.
@Override
@PreEnvironment(required = CreateAuthorizationEndpointResponseParams.ENV_KEY, strings = "issuer")
@PostEnvironment(required = CreateAuthorizationEndpointResponseParams.ENV_KEY)
public Environment evaluate(Environment env) {
JsonObject params = env.getObject(CreateAuthorizationEndpointResponseParams.ENV_KEY);
String issuer = env.getString("issuer");
params.addProperty("iss", issuer);
env.putObject(CreateAuthorizationEndpointResponseParams.ENV_KEY, params);
logSuccess("Added Iss to authorization endpoint response params", args(CreateAuthorizationEndpointResponseParams.ENV_KEY, params));
return env;
}
use of net.openid.conformance.condition.PostEnvironment in project conformance-suite by openid-certification.
the class FAPIBrazilAddBrazilSpecificSettingsToServerConfiguration method evaluate.
@Override
@PreEnvironment(required = { "server" })
@PostEnvironment(required = { "server" })
public Environment evaluate(Environment env) {
JsonObject server = env.getObject("server");
{
JsonArray algValues = new JsonArray();
algValues.add("RSA-OAEP");
server.add("request_object_encryption_alg_values_supported", algValues);
}
{
JsonArray encValues = new JsonArray();
encValues.add("A256GCM");
server.add("request_object_encryption_enc_values_supported", encValues);
}
{
JsonArray claimsSupported = new JsonArray();
claimsSupported.add("cpf");
claimsSupported.add("cnpj");
claimsSupported.add("acr");
server.add("claims_supported", claimsSupported);
}
{
JsonArray acrValuesSupported = new JsonArray();
acrValuesSupported.add("urn:brasil:openbanking:loa2");
acrValuesSupported.add("urn:brasil:openbanking:loa3");
server.add("acr_values_supported", acrValuesSupported);
}
{
JsonArray idTokenSigAlgs = new JsonArray();
idTokenSigAlgs.add("PS256");
server.add("id_token_signing_alg_values_supported", idTokenSigAlgs);
}
{
JsonArray algs = new JsonArray();
algs.add("PS256");
server.add("request_object_signing_alg_values_supported", algs);
}
{
JsonArray scopes = new JsonArray();
scopes.add("openid");
scopes.add("phone");
scopes.add("profile");
scopes.add("email");
scopes.add("address");
scopes.add("offline_access");
scopes.add("consents");
scopes.add("resources");
scopes.add("payments");
server.add("scopes_supported", scopes);
}
log("Added open banking Brazil specific server settings", args("server", server));
return env;
}
Aggregations