authlete 1.0.21 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (161) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/Makefile +40 -0
  4. data/README.md +20 -20
  5. data/Rakefile +5 -0
  6. data/authlete.gemspec +2 -2
  7. data/lib/authlete.rb +28 -9
  8. data/lib/authlete/api.rb +153 -322
  9. data/lib/authlete/authentication-server.rb +230 -230
  10. data/lib/authlete/exception.rb +14 -15
  11. data/lib/authlete/model/base.rb +30 -0
  12. data/lib/authlete/model/client-extension.rb +17 -119
  13. data/lib/authlete/model/client.rb +203 -338
  14. data/lib/authlete/model/hashable.rb +13 -33
  15. data/lib/authlete/model/named-uri.rb +13 -74
  16. data/lib/authlete/model/pair.rb +13 -74
  17. data/lib/authlete/model/param-initializer.rb +45 -0
  18. data/lib/authlete/model/property.rb +15 -85
  19. data/lib/authlete/model/request/authentication-callback-request.rb +63 -55
  20. data/lib/authlete/model/request/authorization-fail-request.rb +14 -75
  21. data/lib/authlete/model/request/authorization-issue-request.rb +38 -119
  22. data/lib/authlete/model/request/authorization-request.rb +8 -73
  23. data/lib/authlete/model/request/backchannel-authentication-complete-request.rb +97 -0
  24. data/lib/authlete/model/request/backchannel-authentication-fail-request.rb +55 -0
  25. data/lib/authlete/model/request/backchannel-authentication-issue-request.rb +37 -0
  26. data/lib/authlete/model/request/backchannel-authentication-request.rb +63 -0
  27. data/lib/authlete/model/request/base.rb +26 -0
  28. data/lib/authlete/model/request/client-authorization-delete-request.rb +7 -93
  29. data/lib/authlete/model/request/client-authorization-get-list-request.rb +17 -89
  30. data/lib/authlete/model/request/client-authorization-update-request.rb +11 -86
  31. data/lib/authlete/model/request/client-registration-request.rb +49 -0
  32. data/lib/authlete/model/request/client-secret-update-request.rb +7 -89
  33. data/lib/authlete/model/request/developer-authentication-callback-request.rb +40 -43
  34. data/lib/authlete/model/request/device-authorization-request.rb +63 -0
  35. data/lib/authlete/model/request/device-complete-request.rb +99 -0
  36. data/lib/authlete/model/request/device-verification-request.rb +40 -0
  37. data/lib/authlete/model/request/granted-scopes-request.rb +8 -74
  38. data/lib/authlete/model/request/introspection-request.rb +24 -83
  39. data/lib/authlete/model/request/pushed-auth-req-request.rb +64 -0
  40. data/lib/authlete/model/request/revocation-request.rb +14 -88
  41. data/lib/authlete/model/request/standard-introspection-request.rb +8 -73
  42. data/lib/authlete/model/request/token-create-request.rb +52 -183
  43. data/lib/authlete/model/request/token-fail-request.rb +12 -74
  44. data/lib/authlete/model/request/token-issue-request.rb +22 -80
  45. data/lib/authlete/model/request/token-request.rb +44 -81
  46. data/lib/authlete/model/request/token-update-request.rb +35 -121
  47. data/lib/authlete/model/request/user-info-issue-request.rb +14 -80
  48. data/lib/authlete/model/request/user-info-request.rb +25 -70
  49. data/lib/authlete/model/response/access-token.rb +96 -0
  50. data/lib/authlete/model/response/authentication-callback-response.rb +24 -19
  51. data/lib/authlete/model/response/authorization-fail-response.rb +13 -15
  52. data/lib/authlete/model/response/authorization-issue-response.rb +29 -32
  53. data/lib/authlete/model/response/authorization-response.rb +97 -123
  54. data/lib/authlete/model/response/authorized-client-list-response.rb +37 -0
  55. data/lib/authlete/model/response/backchannel-authentication-complete-response.rb +143 -0
  56. data/lib/authlete/model/response/backchannel-authentication-fail-response.rb +47 -0
  57. data/lib/authlete/model/response/backchannel-authentication-issue-response.rb +63 -0
  58. data/lib/authlete/model/response/backchannel-authentication-response.rb +160 -0
  59. data/lib/authlete/model/response/client-list-response.rb +58 -0
  60. data/lib/authlete/model/response/client-registration-response.rb +50 -0
  61. data/lib/authlete/model/response/client-secret-refresh-response.rb +12 -12
  62. data/lib/authlete/model/response/client-secret-update-response.rb +12 -12
  63. data/lib/authlete/model/response/developer-authentication-callback-response.rb +24 -19
  64. data/lib/authlete/model/response/device-authorization-response.rb +134 -0
  65. data/lib/authlete/model/response/device-complete-response.rb +39 -0
  66. data/lib/authlete/model/response/device-verification-response.rb +96 -0
  67. data/lib/authlete/model/response/granted-scopes-get-response.rb +27 -19
  68. data/lib/authlete/model/response/introspection-response.rb +64 -58
  69. data/lib/authlete/model/response/pushed-auth-req-response.rb +59 -0
  70. data/lib/authlete/model/response/revocation-response.rb +12 -15
  71. data/lib/authlete/model/response/service-list-response.rb +54 -0
  72. data/lib/authlete/model/response/standard-introspection-response.rb +13 -15
  73. data/lib/authlete/model/response/token-create-response.rb +50 -55
  74. data/lib/authlete/model/response/token-fail-response.rb +14 -17
  75. data/lib/authlete/model/response/token-issue-response.rb +49 -62
  76. data/lib/authlete/model/response/token-list-response.rb +64 -0
  77. data/lib/authlete/model/response/token-response.rb +59 -79
  78. data/lib/authlete/model/response/token-update-response.rb +28 -23
  79. data/lib/authlete/model/response/user-info-issue-response.rb +16 -16
  80. data/lib/authlete/model/response/user-info-response.rb +48 -42
  81. data/lib/authlete/model/result.rb +14 -13
  82. data/lib/authlete/model/scope.rb +68 -158
  83. data/lib/authlete/model/service-owner.rb +32 -116
  84. data/lib/authlete/model/service.rb +672 -837
  85. data/lib/authlete/model/sns-credentials.rb +51 -124
  86. data/lib/authlete/model/tagged-value.rb +14 -69
  87. data/lib/authlete/utility.rb +70 -99
  88. data/lib/authlete/version.rb +3 -3
  89. data/test/authlete/model/request/test_authentication-callback-request.rb +100 -0
  90. data/test/authlete/model/request/test_authorization-fail-request.rb +67 -0
  91. data/test/authlete/model/request/test_authorization-issue-request.rb +94 -0
  92. data/test/authlete/model/request/test_authorization-request.rb +57 -0
  93. data/test/authlete/model/request/test_backchannel-authentication-complete-request.rb +102 -0
  94. data/test/authlete/model/request/test_backchannel-authentication-fail-request.rb +71 -0
  95. data/test/authlete/model/request/test_backchannel-authentication-issue-request.rb +57 -0
  96. data/test/authlete/model/request/test_backchannel-authentication-request.rb +75 -0
  97. data/test/authlete/model/request/test_client-authorization-delete-request.rb +57 -0
  98. data/test/authlete/model/request/test_client-authorization-get-list-request.rb +71 -0
  99. data/test/authlete/model/request/test_client-authorization-update-request.rb +63 -0
  100. data/test/authlete/model/request/test_client-registration-request.rb +68 -0
  101. data/test/authlete/model/request/test_device-authorization-request.rb +75 -0
  102. data/test/authlete/model/request/test_device-complete-request.rb +102 -0
  103. data/test/authlete/model/request/test_device-verification-request.rb +57 -0
  104. data/test/authlete/model/request/test_granted-scopes-request.rb +57 -0
  105. data/test/authlete/model/request/test_introspection-request.rb +79 -0
  106. data/test/authlete/model/request/test_pushed-auth-req-request.rb +75 -0
  107. data/test/authlete/model/request/test_revocation-request.rb +67 -0
  108. data/test/authlete/model/request/test_standard-introspection-request.rb +57 -0
  109. data/test/authlete/model/request/test_token-create-request.rb +110 -0
  110. data/test/authlete/model/request/test_token-fail-request.rb +63 -0
  111. data/test/authlete/model/request/test_token-issue-request.rb +70 -0
  112. data/test/authlete/model/request/test_token-request.rb +94 -0
  113. data/test/authlete/model/request/test_token-update-request.rb +82 -0
  114. data/test/authlete/model/request/test_user-info-issue-request.rb +67 -0
  115. data/test/authlete/model/request/test_user-info-request.rb +75 -0
  116. data/test/authlete/model/response/test_access-token.rb +101 -0
  117. data/test/authlete/model/response/test_authorization-fail-response.rb +68 -0
  118. data/test/authlete/model/response/test_authorization-issue-response.rb +92 -0
  119. data/test/authlete/model/response/test_authorization-response.rb +145 -0
  120. data/test/authlete/model/response/test_authorized-client-list-response.rb +83 -0
  121. data/test/authlete/model/response/test_backchannel-authentication-complete-response.rb +132 -0
  122. data/test/authlete/model/response/test_backchannel-authentication-fail-response.rb +68 -0
  123. data/test/authlete/model/response/test_backchannel-authentication-issue-response.rb +80 -0
  124. data/test/authlete/model/response/test_backchannel-authentication-response.rb +156 -0
  125. data/test/authlete/model/response/test_client-list-response.rb +79 -0
  126. data/test/authlete/model/response/test_client-secret-refresh-response.rb +68 -0
  127. data/test/authlete/model/response/test_client-secret-update-response.rb +68 -0
  128. data/test/authlete/model/response/test_device-authorization-response.rb +140 -0
  129. data/test/authlete/model/response/test_device-complete-response.rb +64 -0
  130. data/test/authlete/model/response/test_device-verification-response.rb +112 -0
  131. data/test/authlete/model/response/test_granted-scopes-get-response.rb +84 -0
  132. data/test/authlete/model/response/test_introspection-response.rb +127 -0
  133. data/test/authlete/model/response/test_pushed-auth-req-response.rb +76 -0
  134. data/test/authlete/model/response/test_revocation-response.rb +68 -0
  135. data/test/authlete/model/response/test_service-list-response.rb +72 -0
  136. data/test/authlete/model/response/test_standard-introspection-response.rb +68 -0
  137. data/test/authlete/model/response/test_token-create-response.rb +107 -0
  138. data/test/authlete/model/response/test_token-fail-response.rb +68 -0
  139. data/test/authlete/model/response/test_token-issue-response.rb +127 -0
  140. data/test/authlete/model/response/test_token-list-response.rb +84 -0
  141. data/test/authlete/model/response/test_token-response.rb +147 -0
  142. data/test/authlete/model/response/test_token-update-response.rb +87 -0
  143. data/test/authlete/model/response/test_user-info-issue-response.rb +68 -0
  144. data/test/authlete/model/response/test_user-info-response.rb +107 -0
  145. data/test/authlete/model/test_client-extension.rb +95 -0
  146. data/test/authlete/model/test_client.rb +461 -0
  147. data/test/authlete/model/test_named-uri.rb +85 -0
  148. data/test/authlete/model/test_pair.rb +85 -0
  149. data/test/authlete/model/test_property.rb +90 -0
  150. data/test/authlete/model/test_result.rb +68 -0
  151. data/test/authlete/model/test_scope.rb +106 -0
  152. data/test/authlete/model/test_service-owner.rb +80 -0
  153. data/test/authlete/model/test_service.rb +624 -0
  154. data/test/authlete/model/test_sns-credentials.rb +88 -0
  155. data/test/authlete/model/test_tagged-value.rb +83 -0
  156. data/test/authlete/test_exception.rb +70 -0
  157. metadata +173 -13
  158. data/lib/authlete/model/client-list.rb +0 -129
  159. data/lib/authlete/model/response/client-authorization-get-list-response.rb +0 -60
  160. data/lib/authlete/model/response/service-creatable-response.rb +0 -51
  161. data/lib/authlete/model/service-list.rb +0 -128
@@ -0,0 +1,624 @@
1
+ # :nodoc:
2
+ #
3
+ # Copyright (C) 2014-2020 Authlete, Inc.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+
18
+ require 'authlete'
19
+ require 'json'
20
+ require 'minitest/autorun'
21
+
22
+
23
+ class ServiceTest < Minitest::Test
24
+ NUMBER = 1000
25
+ SERVICE_OWNER_NUMBER = 12345
26
+ SERVICE_NAME = '<service-name>'
27
+ API_KEY = '<api-key>'
28
+ API_SECRET = '<api-secret>'
29
+ ISSUER = '<issuer>'
30
+ AUTHORIZATION_ENDPOINT = '<authorization-endpoint>'
31
+ TOKEN_ENDPOINT = '<token-endpoint>'
32
+ REVOCATION_ENDPOINT = '<revocation-endpoint>'
33
+ SUPPORTED_REVOCATION_AUTH_METHODS = [ 'NONE', 'CLIENT_SECRET_BASIC' ]
34
+ USER_INFO_ENDPOINT = '<user-info-endpoint>'
35
+ JWKS_URI = '<jwks-uri>'
36
+ JWKS = '<jwks>'
37
+ REGISTRATION_ENDPOINT = '<registration-endpoint>'
38
+ REGISTRATION_MANAGEMENT_ENDPOINT = '<registration-management-endpoint>'
39
+ SUPPORTED_SCOPE_NAME = 'scope0'
40
+ SUPPORTED_SCOPE_DESCRIPTION = '<scope0-description>'
41
+ SUPPORTED_SCOPES = [ Authlete::Model::Scope.new(name: SUPPORTED_SCOPE_NAME, description: SUPPORTED_SCOPE_DESCRIPTION) ]
42
+ SUPPORTED_RESPONSE_TYPES = [ 'NONE', 'CODE', 'TOKEN', 'ID_TOKEN' ]
43
+ SUPPORTED_GRANT_TYPES = [ 'AUTHORIZATION_CODE', 'REFRESH_TOKEN' ]
44
+ SUPPORTED_ACRS = [ '<supported-acr0>', '<supported-acr1>' ]
45
+ SUPPORTED_TOKEN_AUTH_METHODS = [ 'NONE', 'CLIENT_SECRET_BASIC' ]
46
+ SUPPORTED_DISPLAYS = [ 'PAGE', 'POPUP', 'TOUCH', 'WAP' ]
47
+ SUPPORTED_CLAIM_TYPES = [ 'NORMAL' ]
48
+ SUPPORTED_CLAIMS = [ '<supported-claim0>', '<supported-claim1>' ]
49
+ SERVICE_DOCUMENTATION = '<service-documentation>'
50
+ SUPPORTED_CLAIM_LOCALES = [ 'en-US' ]
51
+ SUPPORTED_UI_LOCALES = [ 'en-US' ]
52
+ POLICY_URI = '<policy-uri>'
53
+ TOS_URI = '<tos-uri>'
54
+ AUTHENTICATION_CALLBACK_ENDPOINT = '<authentication-callback-endpoint>'
55
+ AUTHENTICATION_CALLBACK_API_KEY = '<authentication-callback-api-key>'
56
+ AUTHENTICATION_CALLBACK_API_SECRET = '<authentication-callback-api-secret>'
57
+ SUPPORTED_SNSES = [ 'FACEBOOK' ]
58
+ SNS_CREDENTIALS_SNS = 'FACEBOOK'
59
+ SNS_CREDENTIALS_API_KEY = '<sns-credentials0-api-key>'
60
+ SNS_CREDENTIALS_API_SECRET = '<sns-credentials0-api-secret>'
61
+ SNS_CREDENTIALS = [ Authlete::Model::SnsCredentials.new(sns: SNS_CREDENTIALS_SNS, apiKey: SNS_CREDENTIALS_API_KEY, apiSecret: SNS_CREDENTIALS_API_SECRET) ]
62
+ CREATED_AT = 10000
63
+ MODIFIED_AT = 10000
64
+ DEVELOPER_AUTHENTICATION_CALLBACK_ENDPOINT = '<developer-authentication-callback-endpoint>'
65
+ DEVELOPER_AUTHENTICATION_CALLBACK_API_KEY = '<developer-authentication-callback-api-key>'
66
+ DEVELOPER_AUTHENTICATION_CALLBACK_API_SECRET = '<developer-authentication-callback-api-secret>'
67
+ SUPPORTED_DEVELOPER_SNSES = [ 'FACEBOOK' ]
68
+ DEVELOPER_SNS_CREDENTIALS_SNS = 'FACEBOOK'
69
+ DEVELOPER_SNS_CREDENTIALS_API_KEY = '<developer-sns-credentials0-api-key>'
70
+ DEVELOPER_SNS_CREDENTIALS_API_SECRET = '<developer-sns-credentials0-api-secret>'
71
+ DEVELOPER_SNS_CREDENTIALS = [ Authlete::Model::SnsCredentials.new(sns: DEVELOPER_SNS_CREDENTIALS_SNS, apiKey: DEVELOPER_SNS_CREDENTIALS_API_KEY, apiSecret: DEVELOPER_SNS_CREDENTIALS_API_SECRET) ]
72
+ CLIENTS_PER_DEVELOPER = 10
73
+ DIRECT_AUTHORIZATION_ENDPOINT_ENABLED = true
74
+ DIRECT_TOKEN_ENDPOINT_ENABLED = true
75
+ DIRECT_REVOCATION_ENDPOINT_ENABLED = true
76
+ DIRECT_USER_INFO_ENDPOINT_ENABLED = true
77
+ DIRECT_JWKS_ENDPOINT_ENABLED = true
78
+ DIRECT_INTROSPECTION_ENDPOINT_ENABLED = true
79
+ SINGLE_ACCESS_TOKEN_PER_SUBJECT = false
80
+ PKCE_REQUIRED = true
81
+ PKCE_S256_REQUIRED = true
82
+ REFRESH_TOKEN_KEPT = true
83
+ REFRESH_TOKEN_DURATION_KEPT = true
84
+ ERROR_DESCRIPTION_OMITTED = false
85
+ ERROR_URI_OMITTED = false
86
+ CLIENT_ID_ALIAS_ENABLED = true
87
+ SUPPORTED_SERVICE_PROFILES = [ 'FAPI', 'OPEN_BANKING' ]
88
+ TLS_CLIENT_CERTIFICATE_BOUND_ACCESS_TOKENS = true
89
+ INTROSPECTION_ENDPOINT = '<introspection-endpoint>'
90
+ SUPPORTED_INTROSPECTION_AUTH_METHODS = [ 'NONE', 'CLIENT_SECRET_BASIC' ]
91
+ MUTUAL_TLS_VALIDATE_PKI_CERT_CHAIN = true
92
+ TRUSTED_ROOT_CERTIFICATES = [ '<trusted-root-certificate0>', '<trusted-root-certificate1>' ]
93
+ DYNAMIC_REGISTRATION_SUPPORTED = true
94
+ END_SESSION_ENDPOINT = '<end-session-endpoint>'
95
+ DESCRIPTION = '<description>'
96
+ ACCESS_TOKEN_TYPE = 'Bearer'
97
+ ACCESS_TOKEN_SIGN_ALG = 'HS256'
98
+ ACCESS_TOKEN_DURATION = 300
99
+ REFRESH_TOKEN_DURATION = 300
100
+ ID_TOKEN_DURATION = 300
101
+ AUTHORIZATION_RESPONSE_DURATION = 300
102
+ PUSHED_AUTH_REQ_DURATION = 300
103
+ METADATA_KEY = '<metadata0-key>'
104
+ METADATA_VALUE = '<metadata0-value>'
105
+ METADATA = [ Authlete::Model::Pair.new(key: METADATA_KEY, value: METADATA_VALUE) ]
106
+ ACCESS_TOKEN_SIGNATURE_KEY_ID = '<access-token-signature-key-id>'
107
+ AUTHORIZATION_SIGNATURE_KEY_ID = '<authorization-signature-key-id>'
108
+ ID_TOKEN_SIGNATURE_KEY_ID = '<id-token-signature-key-id>'
109
+ USER_INFO_SIGNATURE_KEY_ID = '<user-info-signature-key-id>'
110
+ SUPPORTED_BACKCHANNEL_TOKEN_DELIVERY_MODES = [ 'POLL', 'PING', 'PUSH' ]
111
+ BACKCHANNEL_AUTHENTICATION_ENDPOINT = '<backchannel-authentication-endpoint>'
112
+ BACKCHANNEL_USER_CODE_PARAMETER_SUPPORTED = true
113
+ BACKCHANNEL_AUTH_REQ_ID_DURATION = 300
114
+ BACKCHANNEL_POLLING_INTERVAL = 10
115
+ BACKCHANNEL_BINDING_MESSAGE_REQUIRED_IN_FAPI = true
116
+ ALLOWABLE_CLOCK_SKEW = 100
117
+ DEVICE_AUTHORIZATION_ENDPOINT = '<device-authorization-endpoint>'
118
+ DEVICE_VERIFICATION_URI = '<device-verification-uri>'
119
+ DEVICE_VERIFICATION_URI_COMPLETE = '<device-verification-uri-complete>'
120
+ DEVICE_FLOW_CODE_DURATION = 300
121
+ DEVICE_FLOW_POLLING_INTERVAL = 10
122
+ USER_CODE_CHARSET = 'BASE20'
123
+ USER_CODE_LENGTH = 100
124
+ PUSHED_AUTH_REQ_ENDPOINT = '<pushed-auth-req-endpoint>'
125
+ MTLS_ENDPOINT_ALIAS_NAME = '<mtls-endpoint-alias0-name>'
126
+ MTLS_ENDPOINT_ALIAS_URI = '<mtls-endpoint-alias0-uri>'
127
+ MTLS_ENDPOINT_ALIASES = [ Authlete::Model::NamedUri.new(name: MTLS_ENDPOINT_ALIAS_NAME, uri: MTLS_ENDPOINT_ALIAS_URI) ]
128
+ SUPPORTED_AUTHORIZATION_DATA_TYPES = [ '<supported-authorization-data-type0>', '<supported-authorization-data-type1>' ]
129
+ SUPPORTED_TRUST_FRAMEWORKS = [ '<supported-trust-framework0>', '<supported-trust-framework1>' ]
130
+ SUPPORTED_EVIDENCE = [ '<supported-evidence0>', '<supported-evidence1>' ]
131
+ SUPPORTED_IDENTITY_DOCUMENTS = [ '<supported-identity-document0>', '<supported-identity-document1>' ]
132
+ SUPPORTED_VERIFICATION_METHODS = [ '<supported-verification-method0>', '<supported-verification-method1>' ]
133
+ SUPPORTED_VERIFIED_CLAIMS = [ '<supported-verified-claim0>', '<supported-verified-claim1>' ]
134
+ MISSING_CLIENT_ID_ALLOWED = false
135
+ PAR_REQUIRED = false
136
+ REQUEST_OBJECT_REQUIRED = true
137
+ TRADITIONAL_REQUEST_OBJECT_PROCESSING_APPLIED = false
138
+ CLAIM_SHORTCUT_RESTRICTIVE = false
139
+ SCOPE_REQUIRED = true
140
+ NBF_OPTIONAL = true
141
+ ISS_SUPPRESSED = false
142
+
143
+
144
+ def generate_json
145
+ return <<~JSON
146
+ {
147
+ "number": 1000,
148
+ "serviceOwnerNumber": 12345,
149
+ "serviceName": "<service-name>",
150
+ "apiKey": "<api-key>",
151
+ "apiSecret": "<api-secret>",
152
+ "issuer": "<issuer>",
153
+ "authorizationEndpoint": "<authorization-endpoint>",
154
+ "tokenEndpoint": "<token-endpoint>",
155
+ "revocationEndpoint": "<revocation-endpoint>",
156
+ "supportedRevocationAuthMethods": [ "NONE", "CLIENT_SECRET_BASIC" ],
157
+ "userInfoEndpoint": "<user-info-endpoint>",
158
+ "jwksUri": "<jwks-uri>",
159
+ "jwks": "<jwks>",
160
+ "registrationEndpoint": "<registration-endpoint>",
161
+ "registrationManagementEndpoint": "<registration-management-endpoint>",
162
+ "supportedScopes": [ { "name": "scope0", "description": "<scope0-description>" } ],
163
+ "supportedResponseTypes": [ "NONE", "CODE", "TOKEN", "ID_TOKEN" ],
164
+ "supportedGrantTypes": [ "AUTHORIZATION_CODE", "REFRESH_TOKEN" ],
165
+ "supportedAcrs": [ "<supported-acr0>", "<supported-acr1>" ],
166
+ "supportedTokenAuthMethods": [ "NONE", "CLIENT_SECRET_BASIC" ],
167
+ "supportedDisplays": [ "PAGE", "POPUP", "TOUCH", "WAP" ],
168
+ "supportedClaimTypes": [ "NORMAL" ],
169
+ "supportedClaims": [ "<supported-claim0>", "<supported-claim1>" ],
170
+ "serviceDocumentation": "<service-documentation>",
171
+ "supportedClaimLocales": [ "en-US" ],
172
+ "supportedUiLocales": [ "en-US" ],
173
+ "policyUri": "<policy-uri>",
174
+ "tosUri": "<tos-uri>",
175
+ "authenticationCallbackEndpoint": "<authentication-callback-endpoint>",
176
+ "authenticationCallbackApiKey": "<authentication-callback-api-key>",
177
+ "authenticationCallbackApiSecret": "<authentication-callback-api-secret>",
178
+ "supportedSnses": [ "FACEBOOK" ],
179
+ "snsCredentials": [ { "sns": "FACEBOOK", "apiKey": "<sns-credentials0-api-key>", "apiSecret": "<sns-credentials0-api-secret>" } ],
180
+ "createdAt": 10000,
181
+ "modifiedAt": 10000,
182
+ "developerAuthenticationCallbackEndpoint": "<developer-authentication-callback-endpoint>",
183
+ "developerAuthenticationCallbackApiKey": "<developer-authentication-callback-api-key>",
184
+ "developerAuthenticationCallbackApiSecret": "<developer-authentication-callback-api-secret>",
185
+ "supportedDeveloperSnses": [ "FACEBOOK" ],
186
+ "developerSnsCredentials": [ { "sns": "FACEBOOK", "apiKey": "<developer-sns-credentials0-api-key>", "apiSecret": "<developer-sns-credentials0-api-secret>" } ],
187
+ "clientsPerDeveloper": 10,
188
+ "directAuthorizationEndpointEnabled": true,
189
+ "directTokenEndpointEnabled": true,
190
+ "directRevocationEndpointEnabled": true,
191
+ "directUserInfoEndpointEnabled": true,
192
+ "directJwksEndpointEnabled": true,
193
+ "directIntrospectionEndpointEnabled": true,
194
+ "singleAccessTokenPerSubject": false,
195
+ "pkceRequired": true,
196
+ "pkceS256Required": true,
197
+ "refreshTokenKept": true,
198
+ "refreshTokenDurationKept": true,
199
+ "errorDescriptionOmitted": false,
200
+ "errorUriOmitted": false,
201
+ "clientIdAliasEnabled": true,
202
+ "supportedServiceProfiles": [ "FAPI", "OPEN_BANKING" ],
203
+ "tlsClientCertificateBoundAccessTokens": true,
204
+ "introspectionEndpoint": "<introspection-endpoint>",
205
+ "supportedIntrospectionAuthMethods": [ "NONE", "CLIENT_SECRET_BASIC" ],
206
+ "mutualTlsValidatePkiCertChain": true,
207
+ "trustedRootCertificates": [ "<trusted-root-certificate0>", "<trusted-root-certificate1>" ],
208
+ "dynamicRegistrationSupported": true,
209
+ "endSessionEndpoint": "<end-session-endpoint>",
210
+ "description": "<description>",
211
+ "accessTokenType": "Bearer",
212
+ "accessTokenSignAlg": "HS256",
213
+ "accessTokenDuration": 300,
214
+ "refreshTokenDuration": 300,
215
+ "idTokenDuration": 300,
216
+ "authorizationResponseDuration": 300,
217
+ "pushedAuthReqDuration": 300,
218
+ "metadata": [ { "key": "<metadata0-key>", "value": "<metadata0-value>" } ],
219
+ "accessTokenSignatureKeyId": "<access-token-signature-key-id>",
220
+ "authorizationSignatureKeyId": "<authorization-signature-key-id>",
221
+ "idTokenSignatureKeyId": "<id-token-signature-key-id>",
222
+ "userInfoSignatureKeyId": "<user-info-signature-key-id>",
223
+ "supportedBackchannelTokenDeliveryModes": [ "POLL", "PING", "PUSH" ],
224
+ "backchannelAuthenticationEndpoint": "<backchannel-authentication-endpoint>",
225
+ "backchannelUserCodeParameterSupported": true,
226
+ "backchannelAuthReqIdDuration": 300,
227
+ "backchannelPollingInterval": 10,
228
+ "backchannelBindingMessageRequiredInFapi": true,
229
+ "allowableClockSkew": 100,
230
+ "deviceAuthorizationEndpoint": "<device-authorization-endpoint>",
231
+ "deviceVerificationUri": "<device-verification-uri>",
232
+ "deviceVerificationUriComplete": "<device-verification-uri-complete>",
233
+ "deviceFlowCodeDuration": 300,
234
+ "deviceFlowPollingInterval": 10,
235
+ "userCodeCharset": "BASE20",
236
+ "userCodeLength": 100,
237
+ "pushedAuthReqEndpoint": "<pushed-auth-req-endpoint>",
238
+ "mtlsEndpointAliases": [ { "name": "<mtls-endpoint-alias0-name>", "uri": "<mtls-endpoint-alias0-uri>" } ],
239
+ "supportedAuthorizationDataTypes": [ "<supported-authorization-data-type0>", "<supported-authorization-data-type1>" ],
240
+ "supportedTrustFrameworks": [ "<supported-trust-framework0>", "<supported-trust-framework1>" ],
241
+ "supportedEvidence": [ "<supported-evidence0>", "<supported-evidence1>" ],
242
+ "supportedIdentityDocuments": [ "<supported-identity-document0>", "<supported-identity-document1>" ],
243
+ "supportedVerificationMethods": [ "<supported-verification-method0>", "<supported-verification-method1>" ],
244
+ "supportedVerifiedClaims": [ "<supported-verified-claim0>", "<supported-verified-claim1>" ],
245
+ "missingClientIdAllowed": false,
246
+ "parRequired": false,
247
+ "requestObjectRequired": true,
248
+ "traditionalRequestObjectProcessingApplied": false,
249
+ "claimShortcutRestrictive": false,
250
+ "scopeRequired": true,
251
+ "nbfOptional": true,
252
+ "issSuppressed": false
253
+ }
254
+ JSON
255
+ end
256
+
257
+
258
+ def generate_hash
259
+ {
260
+ number: 1000,
261
+ serviceOwnerNumber: 12345,
262
+ serviceName: '<service-name>',
263
+ apiKey: '<api-key>',
264
+ apiSecret: '<api-secret>',
265
+ issuer: '<issuer>',
266
+ authorizationEndpoint: '<authorization-endpoint>',
267
+ tokenEndpoint: '<token-endpoint>',
268
+ revocationEndpoint: '<revocation-endpoint>',
269
+ supportedRevocationAuthMethods: [ 'NONE', 'CLIENT_SECRET_BASIC' ],
270
+ userInfoEndpoint: '<user-info-endpoint>',
271
+ jwksUri: '<jwks-uri>',
272
+ jwks: '<jwks>',
273
+ registrationEndpoint: '<registration-endpoint>',
274
+ registrationManagementEndpoint: '<registration-management-endpoint>',
275
+ supportedScopes: [ { name: 'scope0', description: '<scope0-description>', defaultEntry: false, descriptions: nil, attributes: nil } ],
276
+ supportedResponseTypes: [ 'NONE', 'CODE', 'TOKEN', 'ID_TOKEN' ],
277
+ supportedGrantTypes: [ 'AUTHORIZATION_CODE', 'REFRESH_TOKEN' ],
278
+ supportedAcrs: [ '<supported-acr0>', '<supported-acr1>' ],
279
+ supportedTokenAuthMethods: [ 'NONE', 'CLIENT_SECRET_BASIC' ],
280
+ supportedDisplays: [ 'PAGE', 'POPUP', 'TOUCH', 'WAP' ],
281
+ supportedClaimTypes: [ 'NORMAL' ],
282
+ supportedClaims: [ '<supported-claim0>', '<supported-claim1>' ],
283
+ serviceDocumentation: '<service-documentation>',
284
+ supportedClaimLocales: [ 'en-US' ],
285
+ supportedUiLocales: [ 'en-US' ],
286
+ policyUri: '<policy-uri>',
287
+ tosUri: '<tos-uri>',
288
+ authenticationCallbackEndpoint: '<authentication-callback-endpoint>',
289
+ authenticationCallbackApiKey: '<authentication-callback-api-key>',
290
+ authenticationCallbackApiSecret: '<authentication-callback-api-secret>',
291
+ supportedSnses: [ 'FACEBOOK' ],
292
+ snsCredentials: [ { sns: 'FACEBOOK', apiKey: '<sns-credentials0-api-key>', apiSecret: '<sns-credentials0-api-secret>' } ],
293
+ createdAt: 10000,
294
+ modifiedAt: 10000,
295
+ developerAuthenticationCallbackEndpoint: '<developer-authentication-callback-endpoint>',
296
+ developerAuthenticationCallbackApiKey: '<developer-authentication-callback-api-key>',
297
+ developerAuthenticationCallbackApiSecret: '<developer-authentication-callback-api-secret>',
298
+ supportedDeveloperSnses: [ 'FACEBOOK' ],
299
+ developerSnsCredentials: [ { sns: 'FACEBOOK', apiKey: '<developer-sns-credentials0-api-key>', apiSecret: '<developer-sns-credentials0-api-secret>' } ],
300
+ clientsPerDeveloper: 10,
301
+ directAuthorizationEndpointEnabled: true,
302
+ directTokenEndpointEnabled: true,
303
+ directRevocationEndpointEnabled: true,
304
+ directUserInfoEndpointEnabled: true,
305
+ directJwksEndpointEnabled: true,
306
+ directIntrospectionEndpointEnabled: true,
307
+ singleAccessTokenPerSubject: false,
308
+ pkceRequired: true,
309
+ pkceS256Required: true,
310
+ refreshTokenKept: true,
311
+ refreshTokenDurationKept: true,
312
+ errorDescriptionOmitted: false,
313
+ errorUriOmitted: false,
314
+ clientIdAliasEnabled: true,
315
+ supportedServiceProfiles: [ 'FAPI', 'OPEN_BANKING' ],
316
+ tlsClientCertificateBoundAccessTokens: true,
317
+ introspectionEndpoint: '<introspection-endpoint>',
318
+ supportedIntrospectionAuthMethods: [ 'NONE', 'CLIENT_SECRET_BASIC' ],
319
+ mutualTlsValidatePkiCertChain: true,
320
+ trustedRootCertificates: [ '<trusted-root-certificate0>', '<trusted-root-certificate1>' ],
321
+ dynamicRegistrationSupported: true,
322
+ endSessionEndpoint: '<end-session-endpoint>',
323
+ description: '<description>',
324
+ accessTokenType: 'Bearer',
325
+ accessTokenSignAlg: 'HS256',
326
+ accessTokenDuration: 300,
327
+ refreshTokenDuration: 300,
328
+ idTokenDuration: 300,
329
+ authorizationResponseDuration: 300,
330
+ pushedAuthReqDuration: 300,
331
+ metadata: [ { key: '<metadata0-key>', value: '<metadata0-value>' } ],
332
+ accessTokenSignatureKeyId: '<access-token-signature-key-id>',
333
+ authorizationSignatureKeyId: '<authorization-signature-key-id>',
334
+ idTokenSignatureKeyId: '<id-token-signature-key-id>',
335
+ userInfoSignatureKeyId: '<user-info-signature-key-id>',
336
+ supportedBackchannelTokenDeliveryModes: [ 'POLL', 'PING', 'PUSH' ],
337
+ backchannelAuthenticationEndpoint: '<backchannel-authentication-endpoint>',
338
+ backchannelUserCodeParameterSupported: true,
339
+ backchannelAuthReqIdDuration: 300,
340
+ backchannelPollingInterval: 10,
341
+ backchannelBindingMessageRequiredInFapi: true,
342
+ allowableClockSkew: 100,
343
+ deviceAuthorizationEndpoint: '<device-authorization-endpoint>',
344
+ deviceVerificationUri: '<device-verification-uri>',
345
+ deviceVerificationUriComplete: '<device-verification-uri-complete>',
346
+ deviceFlowCodeDuration: 300,
347
+ deviceFlowPollingInterval: 10,
348
+ userCodeCharset: 'BASE20',
349
+ userCodeLength: 100,
350
+ pushedAuthReqEndpoint: '<pushed-auth-req-endpoint>',
351
+ mtlsEndpointAliases: [ { name: '<mtls-endpoint-alias0-name>', uri: '<mtls-endpoint-alias0-uri>' } ],
352
+ supportedAuthorizationDataTypes: [ '<supported-authorization-data-type0>', '<supported-authorization-data-type1>' ],
353
+ supportedTrustFrameworks: [ '<supported-trust-framework0>', '<supported-trust-framework1>' ],
354
+ supportedEvidence: [ '<supported-evidence0>', '<supported-evidence1>' ],
355
+ supportedIdentityDocuments: [ '<supported-identity-document0>', '<supported-identity-document1>' ],
356
+ supportedVerificationMethods: [ '<supported-verification-method0>', '<supported-verification-method1>' ],
357
+ supportedVerifiedClaims: [ '<supported-verified-claim0>', '<supported-verified-claim1>' ],
358
+ missingClientIdAllowed: false,
359
+ parRequired: false,
360
+ requestObjectRequired: true,
361
+ traditionalRequestObjectProcessingApplied: false,
362
+ claimShortcutRestrictive: false,
363
+ scopeRequired: true,
364
+ nbfOptional: true,
365
+ issSuppressed: false
366
+ }
367
+ end
368
+
369
+
370
+ def set_params(obj)
371
+ obj.number = NUMBER
372
+ obj.service_owner_number = SERVICE_OWNER_NUMBER
373
+ obj.service_name = SERVICE_NAME
374
+ obj.api_key = API_KEY
375
+ obj.api_secret = API_SECRET
376
+ obj.issuer = ISSUER
377
+ obj.authorization_endpoint = AUTHORIZATION_ENDPOINT
378
+ obj.token_endpoint = TOKEN_ENDPOINT
379
+ obj.revocation_endpoint = REVOCATION_ENDPOINT
380
+ obj.supported_revocation_auth_methods = SUPPORTED_REVOCATION_AUTH_METHODS
381
+ obj.user_info_endpoint = USER_INFO_ENDPOINT
382
+ obj.jwks_uri = JWKS_URI
383
+ obj.jwks = JWKS
384
+ obj.registration_endpoint = REGISTRATION_ENDPOINT
385
+ obj.registration_management_endpoint = REGISTRATION_MANAGEMENT_ENDPOINT
386
+ obj.supported_scopes = SUPPORTED_SCOPES
387
+ obj.supported_response_types = SUPPORTED_RESPONSE_TYPES
388
+ obj.supported_grant_types = SUPPORTED_GRANT_TYPES
389
+ obj.supported_acrs = SUPPORTED_ACRS
390
+ obj.supported_token_auth_methods = SUPPORTED_TOKEN_AUTH_METHODS
391
+ obj.supported_displays = SUPPORTED_DISPLAYS
392
+ obj.supported_claim_types = SUPPORTED_CLAIM_TYPES
393
+ obj.supported_claims = SUPPORTED_CLAIMS
394
+ obj.service_documentation = SERVICE_DOCUMENTATION
395
+ obj.supported_claim_locales = SUPPORTED_CLAIM_LOCALES
396
+ obj.supported_ui_locales = SUPPORTED_UI_LOCALES
397
+ obj.policy_uri = POLICY_URI
398
+ obj.tos_uri = TOS_URI
399
+ obj.authentication_callback_endpoint = AUTHENTICATION_CALLBACK_ENDPOINT
400
+ obj.authentication_callback_api_key = AUTHENTICATION_CALLBACK_API_KEY
401
+ obj.authentication_callback_api_secret = AUTHENTICATION_CALLBACK_API_SECRET
402
+ obj.supported_snses = SUPPORTED_SNSES
403
+ obj.sns_credentials = SNS_CREDENTIALS
404
+ obj.created_at = CREATED_AT
405
+ obj.modified_at = MODIFIED_AT
406
+ obj.developer_authentication_callback_endpoint = DEVELOPER_AUTHENTICATION_CALLBACK_ENDPOINT
407
+ obj.developer_authentication_callback_api_key = DEVELOPER_AUTHENTICATION_CALLBACK_API_KEY
408
+ obj.developer_authentication_callback_api_secret = DEVELOPER_AUTHENTICATION_CALLBACK_API_SECRET
409
+ obj.supported_developer_snses = SUPPORTED_DEVELOPER_SNSES
410
+ obj.developer_sns_credentials = DEVELOPER_SNS_CREDENTIALS
411
+ obj.clients_per_developer = CLIENTS_PER_DEVELOPER
412
+ obj.direct_authorization_endpoint_enabled = DIRECT_AUTHORIZATION_ENDPOINT_ENABLED
413
+ obj.direct_token_endpoint_enabled = DIRECT_TOKEN_ENDPOINT_ENABLED
414
+ obj.direct_revocation_endpoint_enabled = DIRECT_REVOCATION_ENDPOINT_ENABLED
415
+ obj.direct_user_info_endpoint_enabled = DIRECT_USER_INFO_ENDPOINT_ENABLED
416
+ obj.direct_jwks_endpoint_enabled = DIRECT_JWKS_ENDPOINT_ENABLED
417
+ obj.direct_introspection_endpoint_enabled = DIRECT_INTROSPECTION_ENDPOINT_ENABLED
418
+ obj.single_access_token_per_subject = SINGLE_ACCESS_TOKEN_PER_SUBJECT
419
+ obj.pkce_required = PKCE_REQUIRED
420
+ obj.pkce_s256_required = PKCE_S256_REQUIRED
421
+ obj.refresh_token_kept = REFRESH_TOKEN_KEPT
422
+ obj.refresh_token_duration_kept = REFRESH_TOKEN_DURATION_KEPT
423
+ obj.error_description_omitted = ERROR_DESCRIPTION_OMITTED
424
+ obj.error_uri_omitted = ERROR_URI_OMITTED
425
+ obj.client_id_alias_enabled = CLIENT_ID_ALIAS_ENABLED
426
+ obj.supported_service_profiles = SUPPORTED_SERVICE_PROFILES
427
+ obj.tls_client_certificate_bound_access_tokens = TLS_CLIENT_CERTIFICATE_BOUND_ACCESS_TOKENS
428
+ obj.introspection_endpoint = INTROSPECTION_ENDPOINT
429
+ obj.supported_introspection_auth_methods = SUPPORTED_INTROSPECTION_AUTH_METHODS
430
+ obj.mutual_tls_validate_pki_cert_chain = MUTUAL_TLS_VALIDATE_PKI_CERT_CHAIN
431
+ obj.trusted_root_certificates = TRUSTED_ROOT_CERTIFICATES
432
+ obj.dynamic_registration_supported = DYNAMIC_REGISTRATION_SUPPORTED
433
+ obj.end_session_endpoint = END_SESSION_ENDPOINT
434
+ obj.description = DESCRIPTION
435
+ obj.access_token_type = ACCESS_TOKEN_TYPE
436
+ obj.access_token_sign_alg = ACCESS_TOKEN_SIGN_ALG
437
+ obj.access_token_duration = ACCESS_TOKEN_DURATION
438
+ obj.refresh_token_duration = REFRESH_TOKEN_DURATION
439
+ obj.id_token_duration = ID_TOKEN_DURATION
440
+ obj.authorization_response_duration = AUTHORIZATION_RESPONSE_DURATION
441
+ obj.pushed_auth_req_duration = PUSHED_AUTH_REQ_DURATION
442
+ obj.metadata = METADATA
443
+ obj.access_token_signature_key_id = ACCESS_TOKEN_SIGNATURE_KEY_ID
444
+ obj.authorization_signature_key_id = AUTHORIZATION_SIGNATURE_KEY_ID
445
+ obj.id_token_signature_key_id = ID_TOKEN_SIGNATURE_KEY_ID
446
+ obj.user_info_signature_key_id = USER_INFO_SIGNATURE_KEY_ID
447
+ obj.supported_backchannel_token_delivery_modes = SUPPORTED_BACKCHANNEL_TOKEN_DELIVERY_MODES
448
+ obj.backchannel_authentication_endpoint = BACKCHANNEL_AUTHENTICATION_ENDPOINT
449
+ obj.backchannel_user_code_parameter_supported = BACKCHANNEL_USER_CODE_PARAMETER_SUPPORTED
450
+ obj.backchannel_auth_req_id_duration = BACKCHANNEL_AUTH_REQ_ID_DURATION
451
+ obj.backchannel_polling_interval = BACKCHANNEL_POLLING_INTERVAL
452
+ obj.backchannel_binding_message_required_in_fapi = BACKCHANNEL_BINDING_MESSAGE_REQUIRED_IN_FAPI
453
+ obj.allowable_clock_skew = ALLOWABLE_CLOCK_SKEW
454
+ obj.device_authorization_endpoint = DEVICE_AUTHORIZATION_ENDPOINT
455
+ obj.device_verification_uri = DEVICE_VERIFICATION_URI
456
+ obj.device_verification_uri_complete = DEVICE_VERIFICATION_URI_COMPLETE
457
+ obj.device_flow_code_duration = DEVICE_FLOW_CODE_DURATION
458
+ obj.device_flow_polling_interval = DEVICE_FLOW_POLLING_INTERVAL
459
+ obj.user_code_charset = USER_CODE_CHARSET
460
+ obj.user_code_length = USER_CODE_LENGTH
461
+ obj.pushed_auth_req_endpoint = PUSHED_AUTH_REQ_ENDPOINT
462
+ obj.mtls_endpoint_aliases = MTLS_ENDPOINT_ALIASES
463
+ obj.supported_authorization_data_types = SUPPORTED_AUTHORIZATION_DATA_TYPES
464
+ obj.supported_trust_frameworks = SUPPORTED_TRUST_FRAMEWORKS
465
+ obj.supported_evidence = SUPPORTED_EVIDENCE
466
+ obj.supported_identity_documents = SUPPORTED_IDENTITY_DOCUMENTS
467
+ obj.supported_verification_methods = SUPPORTED_VERIFICATION_METHODS
468
+ obj.supported_verified_claims = SUPPORTED_VERIFIED_CLAIMS
469
+ obj.missing_client_id_allowed = MISSING_CLIENT_ID_ALLOWED
470
+ obj.par_required = PAR_REQUIRED
471
+ obj.request_object_required = REQUEST_OBJECT_REQUIRED
472
+ obj.traditional_request_object_processing_applied = TRADITIONAL_REQUEST_OBJECT_PROCESSING_APPLIED
473
+ obj.claim_shortcut_restrictive = CLAIM_SHORTCUT_RESTRICTIVE
474
+ obj.scope_required = SCOPE_REQUIRED
475
+ obj.nbf_optional = NBF_OPTIONAL
476
+ obj.iss_suppressed = ISS_SUPPRESSED
477
+
478
+ obj
479
+ end
480
+
481
+
482
+ def match(obj)
483
+ assert_equal NUMBER, obj.number
484
+ assert_equal SERVICE_OWNER_NUMBER, obj.serviceOwnerNumber
485
+ assert_equal SERVICE_NAME, obj.serviceName
486
+ assert_equal API_KEY, obj.apiKey
487
+ assert_equal API_SECRET, obj.apiSecret
488
+ assert_equal ISSUER, obj.issuer
489
+ assert_equal AUTHORIZATION_ENDPOINT, obj.authorizationEndpoint
490
+ assert_equal TOKEN_ENDPOINT, obj.tokenEndpoint
491
+ assert_equal REVOCATION_ENDPOINT, obj.revocationEndpoint
492
+ assert_equal SUPPORTED_REVOCATION_AUTH_METHODS, obj.supportedRevocationAuthMethods
493
+ assert_equal USER_INFO_ENDPOINT, obj.userInfoEndpoint
494
+ assert_equal JWKS_URI, obj.jwksUri
495
+ assert_equal JWKS, obj.jwks
496
+ assert_equal REGISTRATION_ENDPOINT, obj.registrationEndpoint
497
+ assert_equal REGISTRATION_MANAGEMENT_ENDPOINT, obj.registrationManagementEndpoint
498
+ assert_equal SUPPORTED_SCOPE_NAME, obj.supportedScopes[0].name
499
+ assert_equal SUPPORTED_SCOPE_DESCRIPTION, obj.supportedScopes[0].description
500
+ assert_equal SUPPORTED_RESPONSE_TYPES, obj.supportedResponseTypes
501
+ assert_equal SUPPORTED_GRANT_TYPES, obj.supportedGrantTypes
502
+ assert_equal SUPPORTED_ACRS, obj.supportedAcrs
503
+ assert_equal SUPPORTED_TOKEN_AUTH_METHODS, obj.supportedTokenAuthMethods
504
+ assert_equal SUPPORTED_DISPLAYS, obj.supportedDisplays
505
+ assert_equal SUPPORTED_CLAIM_TYPES, obj.supportedClaimTypes
506
+ assert_equal SUPPORTED_CLAIMS, obj.supportedClaims
507
+ assert_equal SERVICE_DOCUMENTATION, obj.serviceDocumentation
508
+ assert_equal SUPPORTED_CLAIM_LOCALES, obj.supportedClaimLocales
509
+ assert_equal SUPPORTED_UI_LOCALES, obj.supportedUiLocales
510
+ assert_equal POLICY_URI, obj.policyUri
511
+ assert_equal TOS_URI, obj.tosUri
512
+ assert_equal AUTHENTICATION_CALLBACK_ENDPOINT, obj.authenticationCallbackEndpoint
513
+ assert_equal AUTHENTICATION_CALLBACK_API_KEY, obj.authenticationCallbackApiKey
514
+ assert_equal AUTHENTICATION_CALLBACK_API_SECRET, obj.authenticationCallbackApiSecret
515
+ assert_equal SUPPORTED_SNSES, obj.supportedSnses
516
+ assert_equal SNS_CREDENTIALS_SNS, obj.snsCredentials[0].sns
517
+ assert_equal SNS_CREDENTIALS_API_KEY, obj.snsCredentials[0].apiKey
518
+ assert_equal SNS_CREDENTIALS_API_SECRET, obj.snsCredentials[0].apiSecret
519
+ assert_equal CREATED_AT, obj.createdAt
520
+ assert_equal MODIFIED_AT, obj.modifiedAt
521
+ assert_equal DEVELOPER_AUTHENTICATION_CALLBACK_ENDPOINT, obj.developerAuthenticationCallbackEndpoint
522
+ assert_equal DEVELOPER_AUTHENTICATION_CALLBACK_API_KEY, obj.developerAuthenticationCallbackApiKey
523
+ assert_equal DEVELOPER_AUTHENTICATION_CALLBACK_API_SECRET, obj.developerAuthenticationCallbackApiSecret
524
+ assert_equal SUPPORTED_DEVELOPER_SNSES, obj.supportedDeveloperSnses
525
+ assert_equal DEVELOPER_SNS_CREDENTIALS_SNS, obj.developerSnsCredentials[0].sns
526
+ assert_equal DEVELOPER_SNS_CREDENTIALS_API_KEY, obj.developerSnsCredentials[0].apiKey
527
+ assert_equal DEVELOPER_SNS_CREDENTIALS_API_SECRET, obj.developerSnsCredentials[0].apiSecret
528
+ assert_equal CLIENTS_PER_DEVELOPER, obj.clientsPerDeveloper
529
+ assert_equal DIRECT_AUTHORIZATION_ENDPOINT_ENABLED, obj.directAuthorizationEndpointEnabled
530
+ assert_equal DIRECT_TOKEN_ENDPOINT_ENABLED, obj.directTokenEndpointEnabled
531
+ assert_equal DIRECT_REVOCATION_ENDPOINT_ENABLED, obj.directRevocationEndpointEnabled
532
+ assert_equal DIRECT_USER_INFO_ENDPOINT_ENABLED, obj.directUserInfoEndpointEnabled
533
+ assert_equal DIRECT_JWKS_ENDPOINT_ENABLED, obj.directJwksEndpointEnabled
534
+ assert_equal DIRECT_INTROSPECTION_ENDPOINT_ENABLED, obj.directIntrospectionEndpointEnabled
535
+ assert_equal SINGLE_ACCESS_TOKEN_PER_SUBJECT, obj.singleAccessTokenPerSubject
536
+ assert_equal PKCE_REQUIRED, obj.pkceRequired
537
+ assert_equal PKCE_S256_REQUIRED, obj.pkceS256Required
538
+ assert_equal REFRESH_TOKEN_KEPT, obj.refreshTokenKept
539
+ assert_equal REFRESH_TOKEN_DURATION_KEPT, obj.refreshTokenDurationKept
540
+ assert_equal ERROR_DESCRIPTION_OMITTED, obj.errorDescriptionOmitted
541
+ assert_equal ERROR_URI_OMITTED, obj.errorUriOmitted
542
+ assert_equal CLIENT_ID_ALIAS_ENABLED, obj.clientIdAliasEnabled
543
+ assert_equal SUPPORTED_SERVICE_PROFILES, obj.supportedServiceProfiles
544
+ assert_equal TLS_CLIENT_CERTIFICATE_BOUND_ACCESS_TOKENS, obj.tlsClientCertificateBoundAccessTokens
545
+ assert_equal INTROSPECTION_ENDPOINT, obj.introspectionEndpoint
546
+ assert_equal SUPPORTED_INTROSPECTION_AUTH_METHODS, obj.supportedIntrospectionAuthMethods
547
+ assert_equal MUTUAL_TLS_VALIDATE_PKI_CERT_CHAIN, obj.mutualTlsValidatePkiCertChain
548
+ assert_equal TRUSTED_ROOT_CERTIFICATES, obj.trustedRootCertificates
549
+ assert_equal DYNAMIC_REGISTRATION_SUPPORTED, obj.dynamicRegistrationSupported
550
+ assert_equal END_SESSION_ENDPOINT, obj.endSessionEndpoint
551
+ assert_equal DESCRIPTION, obj.description
552
+ assert_equal ACCESS_TOKEN_TYPE, obj.accessTokenType
553
+ assert_equal ACCESS_TOKEN_SIGN_ALG, obj.accessTokenSignAlg
554
+ assert_equal ACCESS_TOKEN_DURATION, obj.accessTokenDuration
555
+ assert_equal REFRESH_TOKEN_DURATION, obj.refreshTokenDuration
556
+ assert_equal ID_TOKEN_DURATION, obj.idTokenDuration
557
+ assert_equal AUTHORIZATION_RESPONSE_DURATION, obj.authorizationResponseDuration
558
+ assert_equal PUSHED_AUTH_REQ_DURATION, obj.pushedAuthReqDuration
559
+ assert_equal METADATA_KEY, obj.metadata[0].key
560
+ assert_equal METADATA_VALUE, obj.metadata[0].value
561
+ assert_equal ACCESS_TOKEN_SIGNATURE_KEY_ID, obj.accessTokenSignatureKeyId
562
+ assert_equal AUTHORIZATION_SIGNATURE_KEY_ID, obj.authorizationSignatureKeyId
563
+ assert_equal ID_TOKEN_SIGNATURE_KEY_ID, obj.idTokenSignatureKeyId
564
+ assert_equal USER_INFO_SIGNATURE_KEY_ID, obj.userInfoSignatureKeyId
565
+ assert_equal SUPPORTED_BACKCHANNEL_TOKEN_DELIVERY_MODES, obj.supportedBackchannelTokenDeliveryModes
566
+ assert_equal BACKCHANNEL_AUTHENTICATION_ENDPOINT, obj.backchannelAuthenticationEndpoint
567
+ assert_equal BACKCHANNEL_USER_CODE_PARAMETER_SUPPORTED, obj.backchannelUserCodeParameterSupported
568
+ assert_equal BACKCHANNEL_AUTH_REQ_ID_DURATION, obj.backchannelAuthReqIdDuration
569
+ assert_equal BACKCHANNEL_POLLING_INTERVAL, obj.backchannelPollingInterval
570
+ assert_equal BACKCHANNEL_BINDING_MESSAGE_REQUIRED_IN_FAPI, obj.backchannelBindingMessageRequiredInFapi
571
+ assert_equal ALLOWABLE_CLOCK_SKEW, obj.allowableClockSkew
572
+ assert_equal DEVICE_AUTHORIZATION_ENDPOINT, obj.deviceAuthorizationEndpoint
573
+ assert_equal DEVICE_VERIFICATION_URI, obj.deviceVerificationUri
574
+ assert_equal DEVICE_VERIFICATION_URI_COMPLETE, obj.deviceVerificationUriComplete
575
+ assert_equal DEVICE_FLOW_CODE_DURATION, obj.deviceFlowCodeDuration
576
+ assert_equal DEVICE_FLOW_POLLING_INTERVAL, obj.deviceFlowPollingInterval
577
+ assert_equal USER_CODE_CHARSET, obj.userCodeCharset
578
+ assert_equal USER_CODE_LENGTH, obj.userCodeLength
579
+ assert_equal PUSHED_AUTH_REQ_ENDPOINT, obj.pushedAuthReqEndpoint
580
+ assert_equal MTLS_ENDPOINT_ALIAS_NAME, obj.mtlsEndpointAliases[0].name
581
+ assert_equal MTLS_ENDPOINT_ALIAS_URI, obj.mtlsEndpointAliases[0].uri
582
+ assert_equal SUPPORTED_AUTHORIZATION_DATA_TYPES, obj.supportedAuthorizationDataTypes
583
+ assert_equal SUPPORTED_TRUST_FRAMEWORKS, obj.supportedTrustFrameworks
584
+ assert_equal SUPPORTED_EVIDENCE, obj.supportedEvidence
585
+ assert_equal SUPPORTED_IDENTITY_DOCUMENTS, obj.supportedIdentityDocuments
586
+ assert_equal SUPPORTED_VERIFICATION_METHODS, obj.supportedVerificationMethods
587
+ assert_equal SUPPORTED_VERIFIED_CLAIMS, obj.supportedVerifiedClaims
588
+ assert_equal MISSING_CLIENT_ID_ALLOWED, obj.missingClientIdAllowed
589
+ assert_equal PAR_REQUIRED, obj.parRequired
590
+ assert_equal REQUEST_OBJECT_REQUIRED, obj.requestObjectRequired
591
+ assert_equal TRADITIONAL_REQUEST_OBJECT_PROCESSING_APPLIED, obj.traditionalRequestObjectProcessingApplied
592
+ assert_equal CLAIM_SHORTCUT_RESTRICTIVE, obj.claimShortcutRestrictive
593
+ assert_equal SCOPE_REQUIRED, obj.scopeRequired
594
+ assert_equal NBF_OPTIONAL, obj.nbfOptional
595
+ assert_equal ISS_SUPPRESSED, obj.issSuppressed
596
+ end
597
+
598
+
599
+ def test_from_json
600
+ jsn = generate_json
601
+ hsh = JSON.parse(jsn)
602
+ actual = Authlete::Model::Service.new(hsh)
603
+
604
+ match(actual)
605
+ end
606
+
607
+
608
+ def test_setters
609
+ actual = Authlete::Model::Service.new
610
+ set_params(actual)
611
+
612
+ match(actual)
613
+ end
614
+
615
+
616
+ def test_to_hash
617
+ obj = Authlete::Model::Service.new
618
+ set_params(obj)
619
+ actual = obj.to_hash
620
+ expected = generate_hash
621
+
622
+ assert_equal expected, actual
623
+ end
624
+ end