|
| 1 | +package org.oidc.msg.oauth2; |
| 2 | + |
| 3 | +import java.util.HashMap; |
| 4 | +import java.util.Map; |
| 5 | + |
| 6 | +import org.oidc.msg.ParameterVerification; |
| 7 | + |
| 8 | +/** |
| 9 | + * OAuth2 Authorization Server configuration response. |
| 10 | + */ |
| 11 | +public class ASConfigurationResponse extends ResponseMessage { |
| 12 | + |
| 13 | + { // Set parameter requirements for message. |
| 14 | + paramVerDefs.put("issuer", ParameterVerification.SINGLE_REQUIRED_STRING.getValue()); |
| 15 | + paramVerDefs.put("authorization_endpoint", |
| 16 | + ParameterVerification.SINGLE_OPTIONAL_STRING.getValue()); |
| 17 | + paramVerDefs.put("token_endpoint", ParameterVerification.SINGLE_OPTIONAL_STRING.getValue()); |
| 18 | + paramVerDefs.put("jwks_uri", ParameterVerification.SINGLE_OPTIONAL_STRING.getValue()); |
| 19 | + paramVerDefs.put("registration_endpoint", |
| 20 | + ParameterVerification.SINGLE_OPTIONAL_STRING.getValue()); |
| 21 | + paramVerDefs.put("scopes_supported", ParameterVerification.OPTIONAL_LIST_OF_STRINGS.getValue()); |
| 22 | + paramVerDefs.put("response_types_supported", |
| 23 | + ParameterVerification.REQUIRED_LIST_OF_STRINGS.getValue()); |
| 24 | + paramVerDefs.put("response_modes_supported", |
| 25 | + ParameterVerification.OPTIONAL_LIST_OF_STRINGS.getValue()); |
| 26 | + paramVerDefs.put("grant_types_supported", |
| 27 | + ParameterVerification.REQUIRED_LIST_OF_STRINGS.getValue()); |
| 28 | + paramVerDefs.put("token_endpoint_auth_methods_supported", |
| 29 | + ParameterVerification.OPTIONAL_LIST_OF_STRINGS.getValue()); |
| 30 | + paramVerDefs.put("token_endpoint_auth_signing_alg_values_supported", |
| 31 | + ParameterVerification.OPTIONAL_LIST_OF_STRINGS.getValue()); |
| 32 | + paramVerDefs.put("service_documentation", |
| 33 | + ParameterVerification.SINGLE_OPTIONAL_STRING.getValue()); |
| 34 | + paramVerDefs.put("ui_locales_supported", |
| 35 | + ParameterVerification.OPTIONAL_LIST_OF_STRINGS.getValue()); |
| 36 | + paramVerDefs.put("op_policy_uri", ParameterVerification.SINGLE_OPTIONAL_STRING.getValue()); |
| 37 | + paramVerDefs.put("op_tos_uri", ParameterVerification.SINGLE_OPTIONAL_STRING.getValue()); |
| 38 | + paramVerDefs.put("revocation_endpoint", |
| 39 | + ParameterVerification.SINGLE_OPTIONAL_STRING.getValue()); |
| 40 | + paramVerDefs.put("introspection_endpoint", |
| 41 | + ParameterVerification.SINGLE_OPTIONAL_STRING.getValue()); |
| 42 | + |
| 43 | + defaultValues.put("version", "3.0"); |
| 44 | + } |
| 45 | + |
| 46 | + public ASConfigurationResponse() { |
| 47 | + this(new HashMap<String, Object>()); |
| 48 | + } |
| 49 | + |
| 50 | + public ASConfigurationResponse(Map<String, Object> claims) { |
| 51 | + super(claims); |
| 52 | + addDefaultValues(); |
| 53 | + } |
| 54 | +} |
0 commit comments