authlete 1.0.24 → 1.1.0

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