Skip to content

Commit 3497cd5

Browse files
committed
Initial version
1 parent 9ab8b6a commit 3497cd5

2 files changed

Lines changed: 83 additions & 0 deletions

File tree

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package org.oidc.msg.oauth2;
2+
3+
import java.util.HashMap;
4+
import java.util.Map;
5+
6+
import org.oidc.msg.AbstractMessage;
7+
import org.oidc.msg.ParameterVerification;
8+
9+
/**
10+
* The base OAuth2 response message containing optional error parameters.
11+
*/
12+
public class ResponseMessage extends AbstractMessage {
13+
14+
{ //Set parameter requirements for message.
15+
paramVerDefs.put("error", ParameterVerification.SINGLE_OPTIONAL_STRING.getValue());
16+
paramVerDefs.put("error_description",
17+
ParameterVerification.SINGLE_OPTIONAL_STRING.getValue());
18+
paramVerDefs.put("error_uri",
19+
ParameterVerification.SINGLE_OPTIONAL_STRING.getValue());
20+
}
21+
22+
public ResponseMessage() {
23+
this(new HashMap<String, Object>());
24+
}
25+
26+
public ResponseMessage(Map<String, Object> claims) {
27+
super(claims);
28+
}
29+
}

0 commit comments

Comments
 (0)