authlete 1.38.0 → 1.39.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +5 -5
  2. data/authlete.gemspec +1 -2
  3. data/lib/authlete/model/service.rb +7 -1
  4. data/lib/authlete/version.rb +1 -1
  5. metadata +7 -170
  6. data/test/authlete/model/request/test_authentication-callback-request.rb +0 -100
  7. data/test/authlete/model/request/test_authorization-fail-request.rb +0 -67
  8. data/test/authlete/model/request/test_authorization-issue-request.rb +0 -94
  9. data/test/authlete/model/request/test_authorization-request.rb +0 -57
  10. data/test/authlete/model/request/test_backchannel-authentication-complete-request.rb +0 -102
  11. data/test/authlete/model/request/test_backchannel-authentication-fail-request.rb +0 -71
  12. data/test/authlete/model/request/test_backchannel-authentication-issue-request.rb +0 -57
  13. data/test/authlete/model/request/test_backchannel-authentication-request.rb +0 -75
  14. data/test/authlete/model/request/test_client-authorization-delete-request.rb +0 -57
  15. data/test/authlete/model/request/test_client-authorization-get-list-request.rb +0 -71
  16. data/test/authlete/model/request/test_client-authorization-update-request.rb +0 -63
  17. data/test/authlete/model/request/test_client-registration-request.rb +0 -68
  18. data/test/authlete/model/request/test_device-authorization-request.rb +0 -75
  19. data/test/authlete/model/request/test_device-complete-request.rb +0 -102
  20. data/test/authlete/model/request/test_device-verification-request.rb +0 -57
  21. data/test/authlete/model/request/test_granted-scopes-request.rb +0 -57
  22. data/test/authlete/model/request/test_introspection-request.rb +0 -79
  23. data/test/authlete/model/request/test_pushed-auth-req-request.rb +0 -75
  24. data/test/authlete/model/request/test_revocation-request.rb +0 -67
  25. data/test/authlete/model/request/test_standard-introspection-request.rb +0 -57
  26. data/test/authlete/model/request/test_token-create-request.rb +0 -110
  27. data/test/authlete/model/request/test_token-fail-request.rb +0 -63
  28. data/test/authlete/model/request/test_token-issue-request.rb +0 -70
  29. data/test/authlete/model/request/test_token-request.rb +0 -94
  30. data/test/authlete/model/request/test_token-revoke-request.rb +0 -71
  31. data/test/authlete/model/request/test_token-update-request.rb +0 -82
  32. data/test/authlete/model/request/test_user-info-issue-request.rb +0 -67
  33. data/test/authlete/model/request/test_user-info-request.rb +0 -75
  34. data/test/authlete/model/response/test_access-token.rb +0 -101
  35. data/test/authlete/model/response/test_authorization-fail-response.rb +0 -68
  36. data/test/authlete/model/response/test_authorization-issue-response.rb +0 -92
  37. data/test/authlete/model/response/test_authorization-response.rb +0 -145
  38. data/test/authlete/model/response/test_authorized-client-list-response.rb +0 -83
  39. data/test/authlete/model/response/test_backchannel-authentication-complete-response.rb +0 -132
  40. data/test/authlete/model/response/test_backchannel-authentication-fail-response.rb +0 -68
  41. data/test/authlete/model/response/test_backchannel-authentication-issue-response.rb +0 -80
  42. data/test/authlete/model/response/test_backchannel-authentication-response.rb +0 -156
  43. data/test/authlete/model/response/test_client-list-response.rb +0 -79
  44. data/test/authlete/model/response/test_client-secret-refresh-response.rb +0 -68
  45. data/test/authlete/model/response/test_client-secret-update-response.rb +0 -68
  46. data/test/authlete/model/response/test_device-authorization-response.rb +0 -140
  47. data/test/authlete/model/response/test_device-complete-response.rb +0 -64
  48. data/test/authlete/model/response/test_device-verification-response.rb +0 -112
  49. data/test/authlete/model/response/test_granted-scopes-get-response.rb +0 -84
  50. data/test/authlete/model/response/test_introspection-response.rb +0 -127
  51. data/test/authlete/model/response/test_pushed-auth-req-response.rb +0 -76
  52. data/test/authlete/model/response/test_revocation-response.rb +0 -68
  53. data/test/authlete/model/response/test_service-list-response.rb +0 -72
  54. data/test/authlete/model/response/test_standard-introspection-response.rb +0 -68
  55. data/test/authlete/model/response/test_token-create-response.rb +0 -107
  56. data/test/authlete/model/response/test_token-fail-response.rb +0 -68
  57. data/test/authlete/model/response/test_token-issue-response.rb +0 -127
  58. data/test/authlete/model/response/test_token-list-response.rb +0 -84
  59. data/test/authlete/model/response/test_token-response.rb +0 -147
  60. data/test/authlete/model/response/test_token-revoke-response.rb +0 -63
  61. data/test/authlete/model/response/test_token-update-response.rb +0 -87
  62. data/test/authlete/model/response/test_user-info-issue-response.rb +0 -68
  63. data/test/authlete/model/response/test_user-info-response.rb +0 -107
  64. data/test/authlete/model/test_client-extension.rb +0 -98
  65. data/test/authlete/model/test_client.rb +0 -604
  66. data/test/authlete/model/test_hsk.rb +0 -108
  67. data/test/authlete/model/test_named-uri.rb +0 -83
  68. data/test/authlete/model/test_pair.rb +0 -83
  69. data/test/authlete/model/test_property.rb +0 -88
  70. data/test/authlete/model/test_result.rb +0 -68
  71. data/test/authlete/model/test_scope.rb +0 -104
  72. data/test/authlete/model/test_service-owner.rb +0 -80
  73. data/test/authlete/model/test_service.rb +0 -896
  74. data/test/authlete/model/test_sns-credentials.rb +0 -88
  75. data/test/authlete/model/test_tagged-value.rb +0 -83
  76. data/test/authlete/model/test_trust-anchor.rb +0 -84
  77. data/test/authlete/test_exception.rb +0 -70
  78. data/test/authlete/types/test_application-type.rb +0 -44
  79. data/test/authlete/types/test_client-auth-method.rb +0 -64
  80. data/test/authlete/types/test_delivery-mode.rb +0 -48
  81. data/test/authlete/types/test_grant-type.rb +0 -72
  82. data/test/authlete/types/test_jwealg.rb +0 -104
  83. data/test/authlete/types/test_jweenc.rb +0 -60
  84. data/test/authlete/types/test_jwsalg.rb +0 -96
  85. data/test/authlete/types/test_response-type.rb +0 -68
  86. data/test/authlete/types/test_subject-type.rb +0 -44
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 22ecdaa24a7b32d5b64af960a4436cc00c638500
4
- data.tar.gz: e94085943cb60b8cfa8d9e723217317959d01543
2
+ SHA256:
3
+ metadata.gz: ad3294911fdac07bffbcfba52de0394b6c9c54238aa5de3ad04aa527f80fb917
4
+ data.tar.gz: 52176abfc6daf0fea4516e0da863df86f32a56b392cbf46f2af7d973af8d09a8
5
5
  SHA512:
6
- metadata.gz: 3103c6daf9883baf5253f6d010a3aac581470f6c7ea2344534301f44c0cb88a4bf5a60754f9c631d7c76cb08c13e6128dc6b8b4cfa09f6feed21b91538259071
7
- data.tar.gz: 705c8c5858f83ffc26d7e7070ad5300b5aee2e4401cdca8b98220717ccfe0c962422cb3af1e47c62c2593e4408c0e96d6dfddcb316f25a5b3a7b024065ec4fd4
6
+ metadata.gz: 29e9942e712d2886dd590b47d5eed7581b3b998eae80a2c333c5c5aa5757e53d9c72eab6ef46f8cbd87e4823de32d9619fc8ee514cb03fb6351f8d61d8270f5d
7
+ data.tar.gz: e67b9f685e1d4da518846dcac25fb5bfeea283efbc97e1a3b07f7059e6971f66f8fe7cb6ac62940d49882f7da148af5594a25fa61154569597fcd7eea8a48428
data/authlete.gemspec CHANGED
@@ -13,9 +13,8 @@ Gem::Specification.new do |spec|
13
13
  spec.homepage = "https://www.authlete.com/"
14
14
  spec.license = "Apache License, Version 2.0"
15
15
 
16
- spec.files = `git ls-files -z`.split("\x0")
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.start_with?("test/") }
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
18
  spec.require_paths = ["lib"]
20
19
 
21
20
  spec.add_runtime_dependency "rest-client", ">= 1.7.2"
@@ -635,6 +635,10 @@ module Authlete
635
635
  alias_method :id_token_reissuable, :idTokenReissuable
636
636
  alias_method :id_token_reissuable=, :idTokenReissuable=
637
637
 
638
+ attr_accessor :clientAssertionAudRestrictedToIssuer
639
+ alias_method :client_assertion_aud_restricted_to_issuer, :clientAssertionAudRestrictedToIssuer
640
+ alias_method :client_assertion_aud_restricted_to_issuer=, :clientAssertionAudRestrictedToIssuer=
641
+
638
642
  private
639
643
 
640
644
  def defaults
@@ -796,6 +800,7 @@ module Authlete
796
800
  credentialDuration: 0,
797
801
  credentialJwks: nil,
798
802
  idTokenReissuable: false,
803
+ clientAssertionAudRestrictedToIssuer: false,
799
804
  }
800
805
  end
801
806
 
@@ -957,7 +962,8 @@ module Authlete
957
962
  @credentialDuration = hash[:credentialDuration]
958
963
  @credentialJwks = hash[:credentialJwks]
959
964
  @idTokenReissuable = hash[:idTokenReissuable]
960
-
965
+ @clientAssertionAudRestrictedToIssuer = hash[:clientAssertionAudRestrictedToIssuer]
966
+
961
967
  end
962
968
 
963
969
  def to_hash_value(key, var)
@@ -16,5 +16,5 @@
16
16
 
17
17
 
18
18
  module Authlete
19
- VERSION = "1.38.0"
19
+ VERSION = "1.39.0"
20
20
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authlete
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.38.0
4
+ version: 1.39.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takahiko Kawasaki
8
8
  - Hideki Ikeda
9
9
  - Seth Wright
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-01-30 00:00:00.000000000 Z
13
+ date: 2025-01-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rest-client
@@ -164,92 +164,11 @@ files:
164
164
  - lib/authlete/types/subject-type.rb
165
165
  - lib/authlete/utility.rb
166
166
  - lib/authlete/version.rb
167
- - test/authlete/model/request/test_authentication-callback-request.rb
168
- - test/authlete/model/request/test_authorization-fail-request.rb
169
- - test/authlete/model/request/test_authorization-issue-request.rb
170
- - test/authlete/model/request/test_authorization-request.rb
171
- - test/authlete/model/request/test_backchannel-authentication-complete-request.rb
172
- - test/authlete/model/request/test_backchannel-authentication-fail-request.rb
173
- - test/authlete/model/request/test_backchannel-authentication-issue-request.rb
174
- - test/authlete/model/request/test_backchannel-authentication-request.rb
175
- - test/authlete/model/request/test_client-authorization-delete-request.rb
176
- - test/authlete/model/request/test_client-authorization-get-list-request.rb
177
- - test/authlete/model/request/test_client-authorization-update-request.rb
178
- - test/authlete/model/request/test_client-registration-request.rb
179
- - test/authlete/model/request/test_device-authorization-request.rb
180
- - test/authlete/model/request/test_device-complete-request.rb
181
- - test/authlete/model/request/test_device-verification-request.rb
182
- - test/authlete/model/request/test_granted-scopes-request.rb
183
- - test/authlete/model/request/test_introspection-request.rb
184
- - test/authlete/model/request/test_pushed-auth-req-request.rb
185
- - test/authlete/model/request/test_revocation-request.rb
186
- - test/authlete/model/request/test_standard-introspection-request.rb
187
- - test/authlete/model/request/test_token-create-request.rb
188
- - test/authlete/model/request/test_token-fail-request.rb
189
- - test/authlete/model/request/test_token-issue-request.rb
190
- - test/authlete/model/request/test_token-request.rb
191
- - test/authlete/model/request/test_token-revoke-request.rb
192
- - test/authlete/model/request/test_token-update-request.rb
193
- - test/authlete/model/request/test_user-info-issue-request.rb
194
- - test/authlete/model/request/test_user-info-request.rb
195
- - test/authlete/model/response/test_access-token.rb
196
- - test/authlete/model/response/test_authorization-fail-response.rb
197
- - test/authlete/model/response/test_authorization-issue-response.rb
198
- - test/authlete/model/response/test_authorization-response.rb
199
- - test/authlete/model/response/test_authorized-client-list-response.rb
200
- - test/authlete/model/response/test_backchannel-authentication-complete-response.rb
201
- - test/authlete/model/response/test_backchannel-authentication-fail-response.rb
202
- - test/authlete/model/response/test_backchannel-authentication-issue-response.rb
203
- - test/authlete/model/response/test_backchannel-authentication-response.rb
204
- - test/authlete/model/response/test_client-list-response.rb
205
- - test/authlete/model/response/test_client-secret-refresh-response.rb
206
- - test/authlete/model/response/test_client-secret-update-response.rb
207
- - test/authlete/model/response/test_device-authorization-response.rb
208
- - test/authlete/model/response/test_device-complete-response.rb
209
- - test/authlete/model/response/test_device-verification-response.rb
210
- - test/authlete/model/response/test_granted-scopes-get-response.rb
211
- - test/authlete/model/response/test_introspection-response.rb
212
- - test/authlete/model/response/test_pushed-auth-req-response.rb
213
- - test/authlete/model/response/test_revocation-response.rb
214
- - test/authlete/model/response/test_service-list-response.rb
215
- - test/authlete/model/response/test_standard-introspection-response.rb
216
- - test/authlete/model/response/test_token-create-response.rb
217
- - test/authlete/model/response/test_token-fail-response.rb
218
- - test/authlete/model/response/test_token-issue-response.rb
219
- - test/authlete/model/response/test_token-list-response.rb
220
- - test/authlete/model/response/test_token-response.rb
221
- - test/authlete/model/response/test_token-revoke-response.rb
222
- - test/authlete/model/response/test_token-update-response.rb
223
- - test/authlete/model/response/test_user-info-issue-response.rb
224
- - test/authlete/model/response/test_user-info-response.rb
225
- - test/authlete/model/test_client-extension.rb
226
- - test/authlete/model/test_client.rb
227
- - test/authlete/model/test_hsk.rb
228
- - test/authlete/model/test_named-uri.rb
229
- - test/authlete/model/test_pair.rb
230
- - test/authlete/model/test_property.rb
231
- - test/authlete/model/test_result.rb
232
- - test/authlete/model/test_scope.rb
233
- - test/authlete/model/test_service-owner.rb
234
- - test/authlete/model/test_service.rb
235
- - test/authlete/model/test_sns-credentials.rb
236
- - test/authlete/model/test_tagged-value.rb
237
- - test/authlete/model/test_trust-anchor.rb
238
- - test/authlete/test_exception.rb
239
- - test/authlete/types/test_application-type.rb
240
- - test/authlete/types/test_client-auth-method.rb
241
- - test/authlete/types/test_delivery-mode.rb
242
- - test/authlete/types/test_grant-type.rb
243
- - test/authlete/types/test_jwealg.rb
244
- - test/authlete/types/test_jweenc.rb
245
- - test/authlete/types/test_jwsalg.rb
246
- - test/authlete/types/test_response-type.rb
247
- - test/authlete/types/test_subject-type.rb
248
167
  homepage: https://www.authlete.com/
249
168
  licenses:
250
169
  - Apache License, Version 2.0
251
170
  metadata: {}
252
- post_install_message:
171
+ post_install_message:
253
172
  rdoc_options: []
254
173
  require_paths:
255
174
  - lib
@@ -264,90 +183,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
264
183
  - !ruby/object:Gem::Version
265
184
  version: '0'
266
185
  requirements: []
267
- rubyforge_project:
268
- rubygems_version: 2.6.8
269
- signing_key:
186
+ rubygems_version: 3.0.3.1
187
+ signing_key:
270
188
  specification_version: 4
271
189
  summary: A library for Authlete Web APIs
272
- test_files:
273
- - test/authlete/model/request/test_authentication-callback-request.rb
274
- - test/authlete/model/request/test_authorization-fail-request.rb
275
- - test/authlete/model/request/test_authorization-issue-request.rb
276
- - test/authlete/model/request/test_authorization-request.rb
277
- - test/authlete/model/request/test_backchannel-authentication-complete-request.rb
278
- - test/authlete/model/request/test_backchannel-authentication-fail-request.rb
279
- - test/authlete/model/request/test_backchannel-authentication-issue-request.rb
280
- - test/authlete/model/request/test_backchannel-authentication-request.rb
281
- - test/authlete/model/request/test_client-authorization-delete-request.rb
282
- - test/authlete/model/request/test_client-authorization-get-list-request.rb
283
- - test/authlete/model/request/test_client-authorization-update-request.rb
284
- - test/authlete/model/request/test_client-registration-request.rb
285
- - test/authlete/model/request/test_device-authorization-request.rb
286
- - test/authlete/model/request/test_device-complete-request.rb
287
- - test/authlete/model/request/test_device-verification-request.rb
288
- - test/authlete/model/request/test_granted-scopes-request.rb
289
- - test/authlete/model/request/test_introspection-request.rb
290
- - test/authlete/model/request/test_pushed-auth-req-request.rb
291
- - test/authlete/model/request/test_revocation-request.rb
292
- - test/authlete/model/request/test_standard-introspection-request.rb
293
- - test/authlete/model/request/test_token-create-request.rb
294
- - test/authlete/model/request/test_token-fail-request.rb
295
- - test/authlete/model/request/test_token-issue-request.rb
296
- - test/authlete/model/request/test_token-request.rb
297
- - test/authlete/model/request/test_token-revoke-request.rb
298
- - test/authlete/model/request/test_token-update-request.rb
299
- - test/authlete/model/request/test_user-info-issue-request.rb
300
- - test/authlete/model/request/test_user-info-request.rb
301
- - test/authlete/model/response/test_access-token.rb
302
- - test/authlete/model/response/test_authorization-fail-response.rb
303
- - test/authlete/model/response/test_authorization-issue-response.rb
304
- - test/authlete/model/response/test_authorization-response.rb
305
- - test/authlete/model/response/test_authorized-client-list-response.rb
306
- - test/authlete/model/response/test_backchannel-authentication-complete-response.rb
307
- - test/authlete/model/response/test_backchannel-authentication-fail-response.rb
308
- - test/authlete/model/response/test_backchannel-authentication-issue-response.rb
309
- - test/authlete/model/response/test_backchannel-authentication-response.rb
310
- - test/authlete/model/response/test_client-list-response.rb
311
- - test/authlete/model/response/test_client-secret-refresh-response.rb
312
- - test/authlete/model/response/test_client-secret-update-response.rb
313
- - test/authlete/model/response/test_device-authorization-response.rb
314
- - test/authlete/model/response/test_device-complete-response.rb
315
- - test/authlete/model/response/test_device-verification-response.rb
316
- - test/authlete/model/response/test_granted-scopes-get-response.rb
317
- - test/authlete/model/response/test_introspection-response.rb
318
- - test/authlete/model/response/test_pushed-auth-req-response.rb
319
- - test/authlete/model/response/test_revocation-response.rb
320
- - test/authlete/model/response/test_service-list-response.rb
321
- - test/authlete/model/response/test_standard-introspection-response.rb
322
- - test/authlete/model/response/test_token-create-response.rb
323
- - test/authlete/model/response/test_token-fail-response.rb
324
- - test/authlete/model/response/test_token-issue-response.rb
325
- - test/authlete/model/response/test_token-list-response.rb
326
- - test/authlete/model/response/test_token-response.rb
327
- - test/authlete/model/response/test_token-revoke-response.rb
328
- - test/authlete/model/response/test_token-update-response.rb
329
- - test/authlete/model/response/test_user-info-issue-response.rb
330
- - test/authlete/model/response/test_user-info-response.rb
331
- - test/authlete/model/test_client-extension.rb
332
- - test/authlete/model/test_client.rb
333
- - test/authlete/model/test_hsk.rb
334
- - test/authlete/model/test_named-uri.rb
335
- - test/authlete/model/test_pair.rb
336
- - test/authlete/model/test_property.rb
337
- - test/authlete/model/test_result.rb
338
- - test/authlete/model/test_scope.rb
339
- - test/authlete/model/test_service-owner.rb
340
- - test/authlete/model/test_service.rb
341
- - test/authlete/model/test_sns-credentials.rb
342
- - test/authlete/model/test_tagged-value.rb
343
- - test/authlete/model/test_trust-anchor.rb
344
- - test/authlete/test_exception.rb
345
- - test/authlete/types/test_application-type.rb
346
- - test/authlete/types/test_client-auth-method.rb
347
- - test/authlete/types/test_delivery-mode.rb
348
- - test/authlete/types/test_grant-type.rb
349
- - test/authlete/types/test_jwealg.rb
350
- - test/authlete/types/test_jweenc.rb
351
- - test/authlete/types/test_jwsalg.rb
352
- - test/authlete/types/test_response-type.rb
353
- - test/authlete/types/test_subject-type.rb
190
+ test_files: []
@@ -1,100 +0,0 @@
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 'minitest/autorun'
20
-
21
-
22
- class AuthenticationCallbackRequestTest < Minitest::Test
23
- SERVICE_API_KEY = '<service-api-key>'
24
- CLIENT_ID = 12345
25
- ID = '<id>'
26
- PASSWORD = '<password>'
27
- CLAIMS = [ 'claim0', 'claim1' ]
28
- CLAIMS_LOCALES = [ 'en', 'ja' ]
29
- SNS = 'FACEBOOK'
30
- ACCESS_TOKEN = '<access-token>'
31
- REFRESH_TOKEN = '<refresh-token>'
32
- EXPIRES_IN = 30000
33
- RAW_TOKEN_RESPONSE = '<raw-token-response>'
34
-
35
-
36
- def set_params(obj)
37
- obj.service_api_key = SERVICE_API_KEY
38
- obj.client_id = CLIENT_ID
39
- obj.id = ID
40
- obj.password = PASSWORD
41
- obj.claims = CLAIMS
42
- obj.claims_locales = CLAIMS_LOCALES
43
- obj.sns = SNS
44
- obj.access_token = ACCESS_TOKEN
45
- obj.refresh_token = REFRESH_TOKEN
46
- obj.expires_in = EXPIRES_IN
47
- obj.raw_token_response = RAW_TOKEN_RESPONSE
48
- end
49
-
50
-
51
- def match(obj)
52
- assert_equal SERVICE_API_KEY, obj.serviceApiKey
53
- assert_equal CLIENT_ID, obj.clientId
54
- assert_equal ID, obj.id
55
- assert_equal PASSWORD, obj.password
56
- assert_equal CLAIMS, obj.claims
57
- assert_equal CLAIMS_LOCALES, obj.claimsLocales
58
- assert_equal SNS, obj.sns
59
- assert_equal ACCESS_TOKEN, obj.accessToken
60
- assert_equal REFRESH_TOKEN, obj.refreshToken
61
- assert_equal EXPIRES_IN, obj.expiresIn
62
- assert_equal RAW_TOKEN_RESPONSE, obj.rawTokenResponse
63
- end
64
-
65
-
66
- def generate_hash
67
- {
68
- serviceApiKey: '<service-api-key>',
69
- clientId: 12345,
70
- id: '<id>',
71
- password: '<password>',
72
- claims: [ 'claim0', 'claim1' ],
73
- claimsLocales: [ 'en', 'ja' ],
74
- sns: 'FACEBOOK',
75
- accessToken: '<access-token>',
76
- refreshToken: '<refresh-token>',
77
- expiresIn: 30000,
78
- rawTokenResponse: '<raw-token-response>'
79
- }
80
- end
81
-
82
-
83
- def test_setters
84
- actual = Authlete::Model::Request::AuthenticationCallbackRequest.new
85
- set_params(actual)
86
-
87
- match(actual)
88
- end
89
-
90
-
91
- def test_to_hash
92
- obj = Authlete::Model::Request::AuthenticationCallbackRequest.new
93
- set_params(obj)
94
- actual = obj.to_hash
95
- expected = generate_hash
96
-
97
- assert_equal expected, actual
98
- end
99
- end
100
-
@@ -1,67 +0,0 @@
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 'minitest/autorun'
20
-
21
-
22
- class AuthorizationFailRequestTest < Minitest::Test
23
- TICKET = '<ticket>'
24
- REASON = 'DENIED'
25
- DESCRIPTION = '<description>'
26
-
27
-
28
- def set_params(obj)
29
- obj.ticket = TICKET
30
- obj.reason = REASON
31
- obj.description = DESCRIPTION
32
- end
33
-
34
-
35
- def match(obj)
36
- assert_equal TICKET, obj.ticket
37
- assert_equal REASON, obj.reason
38
- assert_equal DESCRIPTION, obj.description
39
- end
40
-
41
-
42
- def generate_hash
43
- {
44
- ticket: '<ticket>',
45
- reason: 'DENIED',
46
- description: '<description>'
47
- }
48
- end
49
-
50
-
51
- def test_setters
52
- actual = Authlete::Model::Request::AuthorizationFailRequest.new
53
- set_params(actual)
54
-
55
- match(actual)
56
- end
57
-
58
-
59
- def test_to_hash
60
- obj = Authlete::Model::Request::AuthorizationFailRequest.new
61
- set_params(obj)
62
- actual = obj.to_hash
63
- expected = generate_hash
64
-
65
- assert_equal expected, actual
66
- end
67
- end
@@ -1,94 +0,0 @@
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 'minitest/autorun'
20
-
21
-
22
- class AuthorizationIssueRequestTest < Minitest::Test
23
- TICKET = '<ticket>'
24
- SUBJECT = '<subject>'
25
- AUTH_TIME = 100
26
- ACR = '<acr>'
27
- CLAIMS = [ 'claim0', 'claim1' ]
28
- PROPERTY_KEY = '<property0-key>'
29
- PROPERTY_VALUE = '<property0-value>'
30
- PROPERTIES = [ Authlete::Model::Property.new(key: PROPERTY_KEY, value: PROPERTY_VALUE) ]
31
- SCOPES = [ 'scope0', 'scope1' ]
32
- SUB = '<sub>'
33
- IDT_HEADER_PARAMS = '<idt-header-params>'
34
-
35
-
36
- def set_params(obj)
37
- obj.ticket = TICKET
38
- obj.subject = SUBJECT
39
- obj.auth_time = AUTH_TIME
40
- obj.acr = ACR
41
- obj.claims = CLAIMS
42
- obj.properties = PROPERTIES
43
- obj.scopes = SCOPES
44
- obj.sub = SUB
45
- obj.idtHeaderParams = IDT_HEADER_PARAMS
46
- end
47
-
48
-
49
- def match(obj)
50
- assert_equal TICKET, obj.ticket
51
- assert_equal SUBJECT, obj.subject
52
- assert_equal AUTH_TIME, obj.authTime
53
- assert_equal ACR, obj.acr
54
- assert_equal CLAIMS, obj.claims
55
- assert_equal PROPERTY_KEY, obj.properties[0].key
56
- assert_equal PROPERTY_VALUE, obj.properties[0].value
57
- assert_equal SCOPES, obj.scopes
58
- assert_equal SUB, obj.sub
59
- assert_equal IDT_HEADER_PARAMS, obj.idtHeaderParams
60
- end
61
-
62
-
63
- def generate_hash
64
- {
65
- ticket: '<ticket>',
66
- subject: '<subject>',
67
- authTime: 100,
68
- acr: '<acr>',
69
- claims: [ 'claim0', 'claim1' ],
70
- properties: [ { key: '<property0-key>', value: '<property0-value>', hidden: false } ],
71
- scopes: [ 'scope0', 'scope1' ],
72
- sub: '<sub>',
73
- idtHeaderParams: '<idt-header-params>'
74
- }
75
- end
76
-
77
-
78
- def test_setters
79
- actual = Authlete::Model::Request::AuthorizationIssueRequest.new
80
- set_params(actual)
81
-
82
- match(actual)
83
- end
84
-
85
-
86
- def test_to_hash
87
- obj = Authlete::Model::Request::AuthorizationIssueRequest.new
88
- set_params(obj)
89
- actual = obj.to_hash
90
- expected = generate_hash
91
-
92
- assert_equal expected, actual
93
- end
94
- end
@@ -1,57 +0,0 @@
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 'minitest/autorun'
20
-
21
-
22
- class AuthorizationRequestTest < Minitest::Test
23
- PARAMETERS = '<parameters>'
24
-
25
-
26
- def set_params(obj)
27
- obj.parameters = PARAMETERS
28
- end
29
-
30
-
31
- def match(obj)
32
- assert_equal PARAMETERS, obj.parameters
33
- end
34
-
35
-
36
- def generate_hash
37
- { parameters: '<parameters>' }
38
- end
39
-
40
-
41
- def test_setters
42
- actual = Authlete::Model::Request::AuthorizationRequest.new
43
- set_params(actual)
44
-
45
- match(actual)
46
- end
47
-
48
-
49
- def test_to_hash
50
- obj = Authlete::Model::Request::AuthorizationRequest.new
51
- set_params(obj)
52
- actual = obj.to_hash
53
- expected = generate_hash
54
-
55
- assert_equal expected, actual
56
- end
57
- end