authlete 1.0.23 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
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 +153 -322
  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 +205 -349
  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 +488 -677
  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 +93 -0
  145. data/test/authlete/model/test_client.rb +469 -0
  146. data/test/authlete/model/test_named-uri.rb +83 -0
  147. data/test/authlete/model/test_pair.rb +83 -0
  148. data/test/authlete/model/test_property.rb +88 -0
  149. data/test/authlete/model/test_result.rb +68 -0
  150. data/test/authlete/model/test_scope.rb +104 -0
  151. data/test/authlete/model/test_service-owner.rb +80 -0
  152. data/test/authlete/model/test_service.rb +630 -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,630 @@
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_DETAILS_TYPES = [ '<supported-authorization-details-type0>', '<supported-authorization-details-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
+ ATTRIBUTE_KEY = '<attribute0-key>'
143
+ ATTRIBUTE_VALUE = '<attribute0-value>'
144
+ ATTRIBUTES = [ Authlete::Model::Pair.new(key: ATTRIBUTE_KEY, value: ATTRIBUTE_VALUE) ]
145
+
146
+
147
+ def generate_json
148
+ return <<~JSON
149
+ {
150
+ "number": 1000,
151
+ "serviceOwnerNumber": 12345,
152
+ "serviceName": "<service-name>",
153
+ "apiKey": "<api-key>",
154
+ "apiSecret": "<api-secret>",
155
+ "issuer": "<issuer>",
156
+ "authorizationEndpoint": "<authorization-endpoint>",
157
+ "tokenEndpoint": "<token-endpoint>",
158
+ "revocationEndpoint": "<revocation-endpoint>",
159
+ "supportedRevocationAuthMethods": [ "NONE", "CLIENT_SECRET_BASIC" ],
160
+ "userInfoEndpoint": "<user-info-endpoint>",
161
+ "jwksUri": "<jwks-uri>",
162
+ "jwks": "<jwks>",
163
+ "registrationEndpoint": "<registration-endpoint>",
164
+ "registrationManagementEndpoint": "<registration-management-endpoint>",
165
+ "supportedScopes": [ { "name": "scope0", "description": "<scope0-description>" } ],
166
+ "supportedResponseTypes": [ "NONE", "CODE", "TOKEN", "ID_TOKEN" ],
167
+ "supportedGrantTypes": [ "AUTHORIZATION_CODE", "REFRESH_TOKEN" ],
168
+ "supportedAcrs": [ "<supported-acr0>", "<supported-acr1>" ],
169
+ "supportedTokenAuthMethods": [ "NONE", "CLIENT_SECRET_BASIC" ],
170
+ "supportedDisplays": [ "PAGE", "POPUP", "TOUCH", "WAP" ],
171
+ "supportedClaimTypes": [ "NORMAL" ],
172
+ "supportedClaims": [ "<supported-claim0>", "<supported-claim1>" ],
173
+ "serviceDocumentation": "<service-documentation>",
174
+ "supportedClaimLocales": [ "en-US" ],
175
+ "supportedUiLocales": [ "en-US" ],
176
+ "policyUri": "<policy-uri>",
177
+ "tosUri": "<tos-uri>",
178
+ "authenticationCallbackEndpoint": "<authentication-callback-endpoint>",
179
+ "authenticationCallbackApiKey": "<authentication-callback-api-key>",
180
+ "authenticationCallbackApiSecret": "<authentication-callback-api-secret>",
181
+ "supportedSnses": [ "FACEBOOK" ],
182
+ "snsCredentials": [ { "sns": "FACEBOOK", "apiKey": "<sns-credentials0-api-key>", "apiSecret": "<sns-credentials0-api-secret>" } ],
183
+ "createdAt": 10000,
184
+ "modifiedAt": 10000,
185
+ "developerAuthenticationCallbackEndpoint": "<developer-authentication-callback-endpoint>",
186
+ "developerAuthenticationCallbackApiKey": "<developer-authentication-callback-api-key>",
187
+ "developerAuthenticationCallbackApiSecret": "<developer-authentication-callback-api-secret>",
188
+ "supportedDeveloperSnses": [ "FACEBOOK" ],
189
+ "developerSnsCredentials": [ { "sns": "FACEBOOK", "apiKey": "<developer-sns-credentials0-api-key>", "apiSecret": "<developer-sns-credentials0-api-secret>" } ],
190
+ "clientsPerDeveloper": 10,
191
+ "directAuthorizationEndpointEnabled": true,
192
+ "directTokenEndpointEnabled": true,
193
+ "directRevocationEndpointEnabled": true,
194
+ "directUserInfoEndpointEnabled": true,
195
+ "directJwksEndpointEnabled": true,
196
+ "directIntrospectionEndpointEnabled": true,
197
+ "singleAccessTokenPerSubject": false,
198
+ "pkceRequired": true,
199
+ "pkceS256Required": true,
200
+ "refreshTokenKept": true,
201
+ "refreshTokenDurationKept": true,
202
+ "errorDescriptionOmitted": false,
203
+ "errorUriOmitted": false,
204
+ "clientIdAliasEnabled": true,
205
+ "supportedServiceProfiles": [ "FAPI", "OPEN_BANKING" ],
206
+ "tlsClientCertificateBoundAccessTokens": true,
207
+ "introspectionEndpoint": "<introspection-endpoint>",
208
+ "supportedIntrospectionAuthMethods": [ "NONE", "CLIENT_SECRET_BASIC" ],
209
+ "mutualTlsValidatePkiCertChain": true,
210
+ "trustedRootCertificates": [ "<trusted-root-certificate0>", "<trusted-root-certificate1>" ],
211
+ "dynamicRegistrationSupported": true,
212
+ "endSessionEndpoint": "<end-session-endpoint>",
213
+ "description": "<description>",
214
+ "accessTokenType": "Bearer",
215
+ "accessTokenSignAlg": "HS256",
216
+ "accessTokenDuration": 300,
217
+ "refreshTokenDuration": 300,
218
+ "idTokenDuration": 300,
219
+ "authorizationResponseDuration": 300,
220
+ "pushedAuthReqDuration": 300,
221
+ "metadata": [ { "key": "<metadata0-key>", "value": "<metadata0-value>" } ],
222
+ "accessTokenSignatureKeyId": "<access-token-signature-key-id>",
223
+ "authorizationSignatureKeyId": "<authorization-signature-key-id>",
224
+ "idTokenSignatureKeyId": "<id-token-signature-key-id>",
225
+ "userInfoSignatureKeyId": "<user-info-signature-key-id>",
226
+ "supportedBackchannelTokenDeliveryModes": [ "POLL", "PING", "PUSH" ],
227
+ "backchannelAuthenticationEndpoint": "<backchannel-authentication-endpoint>",
228
+ "backchannelUserCodeParameterSupported": true,
229
+ "backchannelAuthReqIdDuration": 300,
230
+ "backchannelPollingInterval": 10,
231
+ "backchannelBindingMessageRequiredInFapi": true,
232
+ "allowableClockSkew": 100,
233
+ "deviceAuthorizationEndpoint": "<device-authorization-endpoint>",
234
+ "deviceVerificationUri": "<device-verification-uri>",
235
+ "deviceVerificationUriComplete": "<device-verification-uri-complete>",
236
+ "deviceFlowCodeDuration": 300,
237
+ "deviceFlowPollingInterval": 10,
238
+ "userCodeCharset": "BASE20",
239
+ "userCodeLength": 100,
240
+ "pushedAuthReqEndpoint": "<pushed-auth-req-endpoint>",
241
+ "mtlsEndpointAliases": [ { "name": "<mtls-endpoint-alias0-name>", "uri": "<mtls-endpoint-alias0-uri>" } ],
242
+ "supportedAuthorizationDetailsTypes": [ "<supported-authorization-details-type0>", "<supported-authorization-details-type1>" ],
243
+ "supportedTrustFrameworks": [ "<supported-trust-framework0>", "<supported-trust-framework1>" ],
244
+ "supportedEvidence": [ "<supported-evidence0>", "<supported-evidence1>" ],
245
+ "supportedIdentityDocuments": [ "<supported-identity-document0>", "<supported-identity-document1>" ],
246
+ "supportedVerificationMethods": [ "<supported-verification-method0>", "<supported-verification-method1>" ],
247
+ "supportedVerifiedClaims": [ "<supported-verified-claim0>", "<supported-verified-claim1>" ],
248
+ "missingClientIdAllowed": false,
249
+ "parRequired": false,
250
+ "requestObjectRequired": true,
251
+ "traditionalRequestObjectProcessingApplied": false,
252
+ "claimShortcutRestrictive": false,
253
+ "scopeRequired": true,
254
+ "nbfOptional": true,
255
+ "issSuppressed": false,
256
+ "attributes": [{ "key": "<attribute0-key>", "value": "<attribute0-value>" }]
257
+ }
258
+ JSON
259
+ end
260
+
261
+
262
+ def generate_hash
263
+ {
264
+ number: 1000,
265
+ serviceOwnerNumber: 12345,
266
+ serviceName: '<service-name>',
267
+ apiKey: '<api-key>',
268
+ apiSecret: '<api-secret>',
269
+ issuer: '<issuer>',
270
+ authorizationEndpoint: '<authorization-endpoint>',
271
+ tokenEndpoint: '<token-endpoint>',
272
+ revocationEndpoint: '<revocation-endpoint>',
273
+ supportedRevocationAuthMethods: [ 'NONE', 'CLIENT_SECRET_BASIC' ],
274
+ userInfoEndpoint: '<user-info-endpoint>',
275
+ jwksUri: '<jwks-uri>',
276
+ jwks: '<jwks>',
277
+ registrationEndpoint: '<registration-endpoint>',
278
+ registrationManagementEndpoint: '<registration-management-endpoint>',
279
+ supportedScopes: [ { name: 'scope0', description: '<scope0-description>', defaultEntry: false, descriptions: nil, attributes: nil } ],
280
+ supportedResponseTypes: [ 'NONE', 'CODE', 'TOKEN', 'ID_TOKEN' ],
281
+ supportedGrantTypes: [ 'AUTHORIZATION_CODE', 'REFRESH_TOKEN' ],
282
+ supportedAcrs: [ '<supported-acr0>', '<supported-acr1>' ],
283
+ supportedTokenAuthMethods: [ 'NONE', 'CLIENT_SECRET_BASIC' ],
284
+ supportedDisplays: [ 'PAGE', 'POPUP', 'TOUCH', 'WAP' ],
285
+ supportedClaimTypes: [ 'NORMAL' ],
286
+ supportedClaims: [ '<supported-claim0>', '<supported-claim1>' ],
287
+ serviceDocumentation: '<service-documentation>',
288
+ supportedClaimLocales: [ 'en-US' ],
289
+ supportedUiLocales: [ 'en-US' ],
290
+ policyUri: '<policy-uri>',
291
+ tosUri: '<tos-uri>',
292
+ authenticationCallbackEndpoint: '<authentication-callback-endpoint>',
293
+ authenticationCallbackApiKey: '<authentication-callback-api-key>',
294
+ authenticationCallbackApiSecret: '<authentication-callback-api-secret>',
295
+ supportedSnses: [ 'FACEBOOK' ],
296
+ snsCredentials: [ { sns: 'FACEBOOK', apiKey: '<sns-credentials0-api-key>', apiSecret: '<sns-credentials0-api-secret>' } ],
297
+ createdAt: 10000,
298
+ modifiedAt: 10000,
299
+ developerAuthenticationCallbackEndpoint: '<developer-authentication-callback-endpoint>',
300
+ developerAuthenticationCallbackApiKey: '<developer-authentication-callback-api-key>',
301
+ developerAuthenticationCallbackApiSecret: '<developer-authentication-callback-api-secret>',
302
+ supportedDeveloperSnses: [ 'FACEBOOK' ],
303
+ developerSnsCredentials: [ { sns: 'FACEBOOK', apiKey: '<developer-sns-credentials0-api-key>', apiSecret: '<developer-sns-credentials0-api-secret>' } ],
304
+ clientsPerDeveloper: 10,
305
+ directAuthorizationEndpointEnabled: true,
306
+ directTokenEndpointEnabled: true,
307
+ directRevocationEndpointEnabled: true,
308
+ directUserInfoEndpointEnabled: true,
309
+ directJwksEndpointEnabled: true,
310
+ directIntrospectionEndpointEnabled: true,
311
+ singleAccessTokenPerSubject: false,
312
+ pkceRequired: true,
313
+ pkceS256Required: true,
314
+ refreshTokenKept: true,
315
+ refreshTokenDurationKept: true,
316
+ errorDescriptionOmitted: false,
317
+ errorUriOmitted: false,
318
+ clientIdAliasEnabled: true,
319
+ supportedServiceProfiles: [ 'FAPI', 'OPEN_BANKING' ],
320
+ tlsClientCertificateBoundAccessTokens: true,
321
+ introspectionEndpoint: '<introspection-endpoint>',
322
+ supportedIntrospectionAuthMethods: [ 'NONE', 'CLIENT_SECRET_BASIC' ],
323
+ mutualTlsValidatePkiCertChain: true,
324
+ trustedRootCertificates: [ '<trusted-root-certificate0>', '<trusted-root-certificate1>' ],
325
+ dynamicRegistrationSupported: true,
326
+ endSessionEndpoint: '<end-session-endpoint>',
327
+ description: '<description>',
328
+ accessTokenType: 'Bearer',
329
+ accessTokenSignAlg: 'HS256',
330
+ accessTokenDuration: 300,
331
+ refreshTokenDuration: 300,
332
+ idTokenDuration: 300,
333
+ authorizationResponseDuration: 300,
334
+ pushedAuthReqDuration: 300,
335
+ metadata: [ { key: '<metadata0-key>', value: '<metadata0-value>' } ],
336
+ accessTokenSignatureKeyId: '<access-token-signature-key-id>',
337
+ authorizationSignatureKeyId: '<authorization-signature-key-id>',
338
+ idTokenSignatureKeyId: '<id-token-signature-key-id>',
339
+ userInfoSignatureKeyId: '<user-info-signature-key-id>',
340
+ supportedBackchannelTokenDeliveryModes: [ 'POLL', 'PING', 'PUSH' ],
341
+ backchannelAuthenticationEndpoint: '<backchannel-authentication-endpoint>',
342
+ backchannelUserCodeParameterSupported: true,
343
+ backchannelAuthReqIdDuration: 300,
344
+ backchannelPollingInterval: 10,
345
+ backchannelBindingMessageRequiredInFapi: true,
346
+ allowableClockSkew: 100,
347
+ deviceAuthorizationEndpoint: '<device-authorization-endpoint>',
348
+ deviceVerificationUri: '<device-verification-uri>',
349
+ deviceVerificationUriComplete: '<device-verification-uri-complete>',
350
+ deviceFlowCodeDuration: 300,
351
+ deviceFlowPollingInterval: 10,
352
+ userCodeCharset: 'BASE20',
353
+ userCodeLength: 100,
354
+ pushedAuthReqEndpoint: '<pushed-auth-req-endpoint>',
355
+ mtlsEndpointAliases: [ { name: '<mtls-endpoint-alias0-name>', uri: '<mtls-endpoint-alias0-uri>' } ],
356
+ supportedAuthorizationDetailsTypes: [ '<supported-authorization-details-type0>', '<supported-authorization-details-type1>' ],
357
+ supportedTrustFrameworks: [ '<supported-trust-framework0>', '<supported-trust-framework1>' ],
358
+ supportedEvidence: [ '<supported-evidence0>', '<supported-evidence1>' ],
359
+ supportedIdentityDocuments: [ '<supported-identity-document0>', '<supported-identity-document1>' ],
360
+ supportedVerificationMethods: [ '<supported-verification-method0>', '<supported-verification-method1>' ],
361
+ supportedVerifiedClaims: [ '<supported-verified-claim0>', '<supported-verified-claim1>' ],
362
+ missingClientIdAllowed: false,
363
+ parRequired: false,
364
+ requestObjectRequired: true,
365
+ traditionalRequestObjectProcessingApplied: false,
366
+ claimShortcutRestrictive: false,
367
+ scopeRequired: true,
368
+ nbfOptional: true,
369
+ issSuppressed: false,
370
+ attributes: [{ key: '<attribute0-key>', value: '<attribute0-value>' }]
371
+ }
372
+ end
373
+
374
+
375
+ def set_params(obj)
376
+ obj.number = NUMBER
377
+ obj.service_owner_number = SERVICE_OWNER_NUMBER
378
+ obj.service_name = SERVICE_NAME
379
+ obj.api_key = API_KEY
380
+ obj.api_secret = API_SECRET
381
+ obj.issuer = ISSUER
382
+ obj.authorization_endpoint = AUTHORIZATION_ENDPOINT
383
+ obj.token_endpoint = TOKEN_ENDPOINT
384
+ obj.revocation_endpoint = REVOCATION_ENDPOINT
385
+ obj.supported_revocation_auth_methods = SUPPORTED_REVOCATION_AUTH_METHODS
386
+ obj.user_info_endpoint = USER_INFO_ENDPOINT
387
+ obj.jwks_uri = JWKS_URI
388
+ obj.jwks = JWKS
389
+ obj.registration_endpoint = REGISTRATION_ENDPOINT
390
+ obj.registration_management_endpoint = REGISTRATION_MANAGEMENT_ENDPOINT
391
+ obj.supported_scopes = SUPPORTED_SCOPES
392
+ obj.supported_response_types = SUPPORTED_RESPONSE_TYPES
393
+ obj.supported_grant_types = SUPPORTED_GRANT_TYPES
394
+ obj.supported_acrs = SUPPORTED_ACRS
395
+ obj.supported_token_auth_methods = SUPPORTED_TOKEN_AUTH_METHODS
396
+ obj.supported_displays = SUPPORTED_DISPLAYS
397
+ obj.supported_claim_types = SUPPORTED_CLAIM_TYPES
398
+ obj.supported_claims = SUPPORTED_CLAIMS
399
+ obj.service_documentation = SERVICE_DOCUMENTATION
400
+ obj.supported_claim_locales = SUPPORTED_CLAIM_LOCALES
401
+ obj.supported_ui_locales = SUPPORTED_UI_LOCALES
402
+ obj.policy_uri = POLICY_URI
403
+ obj.tos_uri = TOS_URI
404
+ obj.authentication_callback_endpoint = AUTHENTICATION_CALLBACK_ENDPOINT
405
+ obj.authentication_callback_api_key = AUTHENTICATION_CALLBACK_API_KEY
406
+ obj.authentication_callback_api_secret = AUTHENTICATION_CALLBACK_API_SECRET
407
+ obj.supported_snses = SUPPORTED_SNSES
408
+ obj.sns_credentials = SNS_CREDENTIALS
409
+ obj.created_at = CREATED_AT
410
+ obj.modified_at = MODIFIED_AT
411
+ obj.developer_authentication_callback_endpoint = DEVELOPER_AUTHENTICATION_CALLBACK_ENDPOINT
412
+ obj.developer_authentication_callback_api_key = DEVELOPER_AUTHENTICATION_CALLBACK_API_KEY
413
+ obj.developer_authentication_callback_api_secret = DEVELOPER_AUTHENTICATION_CALLBACK_API_SECRET
414
+ obj.supported_developer_snses = SUPPORTED_DEVELOPER_SNSES
415
+ obj.developer_sns_credentials = DEVELOPER_SNS_CREDENTIALS
416
+ obj.clients_per_developer = CLIENTS_PER_DEVELOPER
417
+ obj.direct_authorization_endpoint_enabled = DIRECT_AUTHORIZATION_ENDPOINT_ENABLED
418
+ obj.direct_token_endpoint_enabled = DIRECT_TOKEN_ENDPOINT_ENABLED
419
+ obj.direct_revocation_endpoint_enabled = DIRECT_REVOCATION_ENDPOINT_ENABLED
420
+ obj.direct_user_info_endpoint_enabled = DIRECT_USER_INFO_ENDPOINT_ENABLED
421
+ obj.direct_jwks_endpoint_enabled = DIRECT_JWKS_ENDPOINT_ENABLED
422
+ obj.direct_introspection_endpoint_enabled = DIRECT_INTROSPECTION_ENDPOINT_ENABLED
423
+ obj.single_access_token_per_subject = SINGLE_ACCESS_TOKEN_PER_SUBJECT
424
+ obj.pkce_required = PKCE_REQUIRED
425
+ obj.pkce_s256_required = PKCE_S256_REQUIRED
426
+ obj.refresh_token_kept = REFRESH_TOKEN_KEPT
427
+ obj.refresh_token_duration_kept = REFRESH_TOKEN_DURATION_KEPT
428
+ obj.error_description_omitted = ERROR_DESCRIPTION_OMITTED
429
+ obj.error_uri_omitted = ERROR_URI_OMITTED
430
+ obj.client_id_alias_enabled = CLIENT_ID_ALIAS_ENABLED
431
+ obj.supported_service_profiles = SUPPORTED_SERVICE_PROFILES
432
+ obj.tls_client_certificate_bound_access_tokens = TLS_CLIENT_CERTIFICATE_BOUND_ACCESS_TOKENS
433
+ obj.introspection_endpoint = INTROSPECTION_ENDPOINT
434
+ obj.supported_introspection_auth_methods = SUPPORTED_INTROSPECTION_AUTH_METHODS
435
+ obj.mutual_tls_validate_pki_cert_chain = MUTUAL_TLS_VALIDATE_PKI_CERT_CHAIN
436
+ obj.trusted_root_certificates = TRUSTED_ROOT_CERTIFICATES
437
+ obj.dynamic_registration_supported = DYNAMIC_REGISTRATION_SUPPORTED
438
+ obj.end_session_endpoint = END_SESSION_ENDPOINT
439
+ obj.description = DESCRIPTION
440
+ obj.access_token_type = ACCESS_TOKEN_TYPE
441
+ obj.access_token_sign_alg = ACCESS_TOKEN_SIGN_ALG
442
+ obj.access_token_duration = ACCESS_TOKEN_DURATION
443
+ obj.refresh_token_duration = REFRESH_TOKEN_DURATION
444
+ obj.id_token_duration = ID_TOKEN_DURATION
445
+ obj.authorization_response_duration = AUTHORIZATION_RESPONSE_DURATION
446
+ obj.pushed_auth_req_duration = PUSHED_AUTH_REQ_DURATION
447
+ obj.metadata = METADATA
448
+ obj.access_token_signature_key_id = ACCESS_TOKEN_SIGNATURE_KEY_ID
449
+ obj.authorization_signature_key_id = AUTHORIZATION_SIGNATURE_KEY_ID
450
+ obj.id_token_signature_key_id = ID_TOKEN_SIGNATURE_KEY_ID
451
+ obj.user_info_signature_key_id = USER_INFO_SIGNATURE_KEY_ID
452
+ obj.supported_backchannel_token_delivery_modes = SUPPORTED_BACKCHANNEL_TOKEN_DELIVERY_MODES
453
+ obj.backchannel_authentication_endpoint = BACKCHANNEL_AUTHENTICATION_ENDPOINT
454
+ obj.backchannel_user_code_parameter_supported = BACKCHANNEL_USER_CODE_PARAMETER_SUPPORTED
455
+ obj.backchannel_auth_req_id_duration = BACKCHANNEL_AUTH_REQ_ID_DURATION
456
+ obj.backchannel_polling_interval = BACKCHANNEL_POLLING_INTERVAL
457
+ obj.backchannel_binding_message_required_in_fapi = BACKCHANNEL_BINDING_MESSAGE_REQUIRED_IN_FAPI
458
+ obj.allowable_clock_skew = ALLOWABLE_CLOCK_SKEW
459
+ obj.device_authorization_endpoint = DEVICE_AUTHORIZATION_ENDPOINT
460
+ obj.device_verification_uri = DEVICE_VERIFICATION_URI
461
+ obj.device_verification_uri_complete = DEVICE_VERIFICATION_URI_COMPLETE
462
+ obj.device_flow_code_duration = DEVICE_FLOW_CODE_DURATION
463
+ obj.device_flow_polling_interval = DEVICE_FLOW_POLLING_INTERVAL
464
+ obj.user_code_charset = USER_CODE_CHARSET
465
+ obj.user_code_length = USER_CODE_LENGTH
466
+ obj.pushed_auth_req_endpoint = PUSHED_AUTH_REQ_ENDPOINT
467
+ obj.mtls_endpoint_aliases = MTLS_ENDPOINT_ALIASES
468
+ obj.supported_authorization_details_types = SUPPORTED_AUTHORIZATION_DETAILS_TYPES
469
+ obj.supported_trust_frameworks = SUPPORTED_TRUST_FRAMEWORKS
470
+ obj.supported_evidence = SUPPORTED_EVIDENCE
471
+ obj.supported_identity_documents = SUPPORTED_IDENTITY_DOCUMENTS
472
+ obj.supported_verification_methods = SUPPORTED_VERIFICATION_METHODS
473
+ obj.supported_verified_claims = SUPPORTED_VERIFIED_CLAIMS
474
+ obj.missing_client_id_allowed = MISSING_CLIENT_ID_ALLOWED
475
+ obj.par_required = PAR_REQUIRED
476
+ obj.request_object_required = REQUEST_OBJECT_REQUIRED
477
+ obj.traditional_request_object_processing_applied = TRADITIONAL_REQUEST_OBJECT_PROCESSING_APPLIED
478
+ obj.claim_shortcut_restrictive = CLAIM_SHORTCUT_RESTRICTIVE
479
+ obj.scope_required = SCOPE_REQUIRED
480
+ obj.nbf_optional = NBF_OPTIONAL
481
+ obj.iss_suppressed = ISS_SUPPRESSED
482
+ obj.attributes = ATTRIBUTES
483
+ end
484
+
485
+
486
+ def match(obj)
487
+ assert_equal NUMBER, obj.number
488
+ assert_equal SERVICE_OWNER_NUMBER, obj.serviceOwnerNumber
489
+ assert_equal SERVICE_NAME, obj.serviceName
490
+ assert_equal API_KEY, obj.apiKey
491
+ assert_equal API_SECRET, obj.apiSecret
492
+ assert_equal ISSUER, obj.issuer
493
+ assert_equal AUTHORIZATION_ENDPOINT, obj.authorizationEndpoint
494
+ assert_equal TOKEN_ENDPOINT, obj.tokenEndpoint
495
+ assert_equal REVOCATION_ENDPOINT, obj.revocationEndpoint
496
+ assert_equal SUPPORTED_REVOCATION_AUTH_METHODS, obj.supportedRevocationAuthMethods
497
+ assert_equal USER_INFO_ENDPOINT, obj.userInfoEndpoint
498
+ assert_equal JWKS_URI, obj.jwksUri
499
+ assert_equal JWKS, obj.jwks
500
+ assert_equal REGISTRATION_ENDPOINT, obj.registrationEndpoint
501
+ assert_equal REGISTRATION_MANAGEMENT_ENDPOINT, obj.registrationManagementEndpoint
502
+ assert_equal SUPPORTED_SCOPE_NAME, obj.supportedScopes[0].name
503
+ assert_equal SUPPORTED_SCOPE_DESCRIPTION, obj.supportedScopes[0].description
504
+ assert_equal SUPPORTED_RESPONSE_TYPES, obj.supportedResponseTypes
505
+ assert_equal SUPPORTED_GRANT_TYPES, obj.supportedGrantTypes
506
+ assert_equal SUPPORTED_ACRS, obj.supportedAcrs
507
+ assert_equal SUPPORTED_TOKEN_AUTH_METHODS, obj.supportedTokenAuthMethods
508
+ assert_equal SUPPORTED_DISPLAYS, obj.supportedDisplays
509
+ assert_equal SUPPORTED_CLAIM_TYPES, obj.supportedClaimTypes
510
+ assert_equal SUPPORTED_CLAIMS, obj.supportedClaims
511
+ assert_equal SERVICE_DOCUMENTATION, obj.serviceDocumentation
512
+ assert_equal SUPPORTED_CLAIM_LOCALES, obj.supportedClaimLocales
513
+ assert_equal SUPPORTED_UI_LOCALES, obj.supportedUiLocales
514
+ assert_equal POLICY_URI, obj.policyUri
515
+ assert_equal TOS_URI, obj.tosUri
516
+ assert_equal AUTHENTICATION_CALLBACK_ENDPOINT, obj.authenticationCallbackEndpoint
517
+ assert_equal AUTHENTICATION_CALLBACK_API_KEY, obj.authenticationCallbackApiKey
518
+ assert_equal AUTHENTICATION_CALLBACK_API_SECRET, obj.authenticationCallbackApiSecret
519
+ assert_equal SUPPORTED_SNSES, obj.supportedSnses
520
+ assert_equal SNS_CREDENTIALS_SNS, obj.snsCredentials[0].sns
521
+ assert_equal SNS_CREDENTIALS_API_KEY, obj.snsCredentials[0].apiKey
522
+ assert_equal SNS_CREDENTIALS_API_SECRET, obj.snsCredentials[0].apiSecret
523
+ assert_equal CREATED_AT, obj.createdAt
524
+ assert_equal MODIFIED_AT, obj.modifiedAt
525
+ assert_equal DEVELOPER_AUTHENTICATION_CALLBACK_ENDPOINT, obj.developerAuthenticationCallbackEndpoint
526
+ assert_equal DEVELOPER_AUTHENTICATION_CALLBACK_API_KEY, obj.developerAuthenticationCallbackApiKey
527
+ assert_equal DEVELOPER_AUTHENTICATION_CALLBACK_API_SECRET, obj.developerAuthenticationCallbackApiSecret
528
+ assert_equal SUPPORTED_DEVELOPER_SNSES, obj.supportedDeveloperSnses
529
+ assert_equal DEVELOPER_SNS_CREDENTIALS_SNS, obj.developerSnsCredentials[0].sns
530
+ assert_equal DEVELOPER_SNS_CREDENTIALS_API_KEY, obj.developerSnsCredentials[0].apiKey
531
+ assert_equal DEVELOPER_SNS_CREDENTIALS_API_SECRET, obj.developerSnsCredentials[0].apiSecret
532
+ assert_equal CLIENTS_PER_DEVELOPER, obj.clientsPerDeveloper
533
+ assert_equal DIRECT_AUTHORIZATION_ENDPOINT_ENABLED, obj.directAuthorizationEndpointEnabled
534
+ assert_equal DIRECT_TOKEN_ENDPOINT_ENABLED, obj.directTokenEndpointEnabled
535
+ assert_equal DIRECT_REVOCATION_ENDPOINT_ENABLED, obj.directRevocationEndpointEnabled
536
+ assert_equal DIRECT_USER_INFO_ENDPOINT_ENABLED, obj.directUserInfoEndpointEnabled
537
+ assert_equal DIRECT_JWKS_ENDPOINT_ENABLED, obj.directJwksEndpointEnabled
538
+ assert_equal DIRECT_INTROSPECTION_ENDPOINT_ENABLED, obj.directIntrospectionEndpointEnabled
539
+ assert_equal SINGLE_ACCESS_TOKEN_PER_SUBJECT, obj.singleAccessTokenPerSubject
540
+ assert_equal PKCE_REQUIRED, obj.pkceRequired
541
+ assert_equal PKCE_S256_REQUIRED, obj.pkceS256Required
542
+ assert_equal REFRESH_TOKEN_KEPT, obj.refreshTokenKept
543
+ assert_equal REFRESH_TOKEN_DURATION_KEPT, obj.refreshTokenDurationKept
544
+ assert_equal ERROR_DESCRIPTION_OMITTED, obj.errorDescriptionOmitted
545
+ assert_equal ERROR_URI_OMITTED, obj.errorUriOmitted
546
+ assert_equal CLIENT_ID_ALIAS_ENABLED, obj.clientIdAliasEnabled
547
+ assert_equal SUPPORTED_SERVICE_PROFILES, obj.supportedServiceProfiles
548
+ assert_equal TLS_CLIENT_CERTIFICATE_BOUND_ACCESS_TOKENS, obj.tlsClientCertificateBoundAccessTokens
549
+ assert_equal INTROSPECTION_ENDPOINT, obj.introspectionEndpoint
550
+ assert_equal SUPPORTED_INTROSPECTION_AUTH_METHODS, obj.supportedIntrospectionAuthMethods
551
+ assert_equal MUTUAL_TLS_VALIDATE_PKI_CERT_CHAIN, obj.mutualTlsValidatePkiCertChain
552
+ assert_equal TRUSTED_ROOT_CERTIFICATES, obj.trustedRootCertificates
553
+ assert_equal DYNAMIC_REGISTRATION_SUPPORTED, obj.dynamicRegistrationSupported
554
+ assert_equal END_SESSION_ENDPOINT, obj.endSessionEndpoint
555
+ assert_equal DESCRIPTION, obj.description
556
+ assert_equal ACCESS_TOKEN_TYPE, obj.accessTokenType
557
+ assert_equal ACCESS_TOKEN_SIGN_ALG, obj.accessTokenSignAlg
558
+ assert_equal ACCESS_TOKEN_DURATION, obj.accessTokenDuration
559
+ assert_equal REFRESH_TOKEN_DURATION, obj.refreshTokenDuration
560
+ assert_equal ID_TOKEN_DURATION, obj.idTokenDuration
561
+ assert_equal AUTHORIZATION_RESPONSE_DURATION, obj.authorizationResponseDuration
562
+ assert_equal PUSHED_AUTH_REQ_DURATION, obj.pushedAuthReqDuration
563
+ assert_equal METADATA_KEY, obj.metadata[0].key
564
+ assert_equal METADATA_VALUE, obj.metadata[0].value
565
+ assert_equal ACCESS_TOKEN_SIGNATURE_KEY_ID, obj.accessTokenSignatureKeyId
566
+ assert_equal AUTHORIZATION_SIGNATURE_KEY_ID, obj.authorizationSignatureKeyId
567
+ assert_equal ID_TOKEN_SIGNATURE_KEY_ID, obj.idTokenSignatureKeyId
568
+ assert_equal USER_INFO_SIGNATURE_KEY_ID, obj.userInfoSignatureKeyId
569
+ assert_equal SUPPORTED_BACKCHANNEL_TOKEN_DELIVERY_MODES, obj.supportedBackchannelTokenDeliveryModes
570
+ assert_equal BACKCHANNEL_AUTHENTICATION_ENDPOINT, obj.backchannelAuthenticationEndpoint
571
+ assert_equal BACKCHANNEL_USER_CODE_PARAMETER_SUPPORTED, obj.backchannelUserCodeParameterSupported
572
+ assert_equal BACKCHANNEL_AUTH_REQ_ID_DURATION, obj.backchannelAuthReqIdDuration
573
+ assert_equal BACKCHANNEL_POLLING_INTERVAL, obj.backchannelPollingInterval
574
+ assert_equal BACKCHANNEL_BINDING_MESSAGE_REQUIRED_IN_FAPI, obj.backchannelBindingMessageRequiredInFapi
575
+ assert_equal ALLOWABLE_CLOCK_SKEW, obj.allowableClockSkew
576
+ assert_equal DEVICE_AUTHORIZATION_ENDPOINT, obj.deviceAuthorizationEndpoint
577
+ assert_equal DEVICE_VERIFICATION_URI, obj.deviceVerificationUri
578
+ assert_equal DEVICE_VERIFICATION_URI_COMPLETE, obj.deviceVerificationUriComplete
579
+ assert_equal DEVICE_FLOW_CODE_DURATION, obj.deviceFlowCodeDuration
580
+ assert_equal DEVICE_FLOW_POLLING_INTERVAL, obj.deviceFlowPollingInterval
581
+ assert_equal USER_CODE_CHARSET, obj.userCodeCharset
582
+ assert_equal USER_CODE_LENGTH, obj.userCodeLength
583
+ assert_equal PUSHED_AUTH_REQ_ENDPOINT, obj.pushedAuthReqEndpoint
584
+ assert_equal MTLS_ENDPOINT_ALIAS_NAME, obj.mtlsEndpointAliases[0].name
585
+ assert_equal MTLS_ENDPOINT_ALIAS_URI, obj.mtlsEndpointAliases[0].uri
586
+ assert_equal SUPPORTED_AUTHORIZATION_DETAILS_TYPES, obj.supportedAuthorizationDetailsTypes
587
+ assert_equal SUPPORTED_TRUST_FRAMEWORKS, obj.supportedTrustFrameworks
588
+ assert_equal SUPPORTED_EVIDENCE, obj.supportedEvidence
589
+ assert_equal SUPPORTED_IDENTITY_DOCUMENTS, obj.supportedIdentityDocuments
590
+ assert_equal SUPPORTED_VERIFICATION_METHODS, obj.supportedVerificationMethods
591
+ assert_equal SUPPORTED_VERIFIED_CLAIMS, obj.supportedVerifiedClaims
592
+ assert_equal MISSING_CLIENT_ID_ALLOWED, obj.missingClientIdAllowed
593
+ assert_equal PAR_REQUIRED, obj.parRequired
594
+ assert_equal REQUEST_OBJECT_REQUIRED, obj.requestObjectRequired
595
+ assert_equal TRADITIONAL_REQUEST_OBJECT_PROCESSING_APPLIED, obj.traditionalRequestObjectProcessingApplied
596
+ assert_equal CLAIM_SHORTCUT_RESTRICTIVE, obj.claimShortcutRestrictive
597
+ assert_equal SCOPE_REQUIRED, obj.scopeRequired
598
+ assert_equal NBF_OPTIONAL, obj.nbfOptional
599
+ assert_equal ISS_SUPPRESSED, obj.issSuppressed
600
+ assert_equal ATTRIBUTE_KEY, obj.attributes[0].key
601
+ assert_equal ATTRIBUTE_VALUE, obj.attributes[0].value
602
+ end
603
+
604
+
605
+ def test_from_json
606
+ jsn = generate_json
607
+ hsh = JSON.parse(jsn)
608
+ actual = Authlete::Model::Service.new(hsh)
609
+
610
+ match(actual)
611
+ end
612
+
613
+
614
+ def test_setters
615
+ actual = Authlete::Model::Service.new
616
+ set_params(actual)
617
+
618
+ match(actual)
619
+ end
620
+
621
+
622
+ def test_to_hash
623
+ obj = Authlete::Model::Service.new
624
+ set_params(obj)
625
+ actual = obj.to_hash
626
+ expected = generate_hash
627
+
628
+ assert_equal expected, actual
629
+ end
630
+ end