authlete 1.26.1 → 1.27.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/authlete.gemspec +1 -1
- data/lib/authlete/model/client.rb +119 -1
- data/lib/authlete/model/service.rb +7 -1
- data/lib/authlete/types/application-type.rb +27 -0
- data/lib/authlete/types/client-auth-method.rb +32 -0
- data/lib/authlete/types/constant-utility.rb +34 -0
- data/lib/authlete/types/delivery-mode.rb +28 -0
- data/lib/authlete/types/grant-type.rb +34 -0
- data/lib/authlete/types/jwealg.rb +42 -0
- data/lib/authlete/types/jweenc.rb +31 -0
- data/lib/authlete/types/jwsalg.rb +40 -0
- data/lib/authlete/types/response-type.rb +33 -0
- data/lib/authlete/types/subject-type.rb +27 -0
- data/lib/authlete/version.rb +2 -2
- data/lib/authlete.rb +14 -1
- data/test/authlete/model/test_client.rb +83 -6
- data/test/authlete/model/test_service.rb +8 -3
- data/test/authlete/types/test_application-type.rb +44 -0
- data/test/authlete/types/test_client-auth-method.rb +64 -0
- data/test/authlete/types/test_delivery-mode.rb +48 -0
- data/test/authlete/types/test_grant-type.rb +72 -0
- data/test/authlete/types/test_jwealg.rb +104 -0
- data/test/authlete/types/test_jweenc.rb +60 -0
- data/test/authlete/types/test_jwsalg.rb +96 -0
- data/test/authlete/types/test_response-type.rb +68 -0
- data/test/authlete/types/test_subject-type.rb +44 -0
- metadata +35 -6
@@ -0,0 +1,68 @@
|
|
1
|
+
# :nodoc:
|
2
|
+
#
|
3
|
+
# Copyright (C) 2022 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 ResponseTypeTest < Minitest::Test
|
23
|
+
def do_test(input, expected)
|
24
|
+
output = Authlete::Types::ResponseType::constant_get(input)
|
25
|
+
|
26
|
+
if expected.nil?
|
27
|
+
assert_nil output
|
28
|
+
else
|
29
|
+
assert_equal expected, output
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_unknown
|
34
|
+
do_test('UNKNOWN', nil)
|
35
|
+
end
|
36
|
+
|
37
|
+
def test_none
|
38
|
+
do_test('NONE', 'none')
|
39
|
+
end
|
40
|
+
|
41
|
+
def test_code
|
42
|
+
do_test('CODE', 'code')
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_token
|
46
|
+
do_test('TOKEN', 'token')
|
47
|
+
end
|
48
|
+
|
49
|
+
def test_id_token
|
50
|
+
do_test('ID_TOKEN', 'id_token')
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_code_token
|
54
|
+
do_test('CODE_TOKEN', 'code token')
|
55
|
+
end
|
56
|
+
|
57
|
+
def test_code_id_token
|
58
|
+
do_test('CODE_ID_TOKEN', 'code id_token')
|
59
|
+
end
|
60
|
+
|
61
|
+
def test_id_token_token
|
62
|
+
do_test('ID_TOKEN_TOKEN', 'id_token token')
|
63
|
+
end
|
64
|
+
|
65
|
+
def test_code_id_token_token
|
66
|
+
do_test('CODE_ID_TOKEN_TOKEN', 'code id_token token')
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# :nodoc:
|
2
|
+
#
|
3
|
+
# Copyright (C) 2022 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 SubjectTypeTest < Minitest::Test
|
23
|
+
def do_test(input, expected)
|
24
|
+
output = Authlete::Types::SubjectType::constant_get(input)
|
25
|
+
|
26
|
+
if expected.nil?
|
27
|
+
assert_nil output
|
28
|
+
else
|
29
|
+
assert_equal expected, output
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_unknown
|
34
|
+
do_test('UNKNOWN', nil)
|
35
|
+
end
|
36
|
+
|
37
|
+
def test_public
|
38
|
+
do_test('PUBLIC', 'public')
|
39
|
+
end
|
40
|
+
|
41
|
+
def test_pairwise
|
42
|
+
do_test('PAIRWISE', 'pairwise')
|
43
|
+
end
|
44
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authlete
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.27.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takahiko Kawasaki
|
8
8
|
- Hideki Ikeda
|
9
|
-
|
9
|
+
- Seth Wright
|
10
|
+
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2022-
|
13
|
+
date: 2022-11-20 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: rest-client
|
@@ -149,6 +150,16 @@ files:
|
|
149
150
|
- lib/authlete/model/sns-credentials.rb
|
150
151
|
- lib/authlete/model/tagged-value.rb
|
151
152
|
- lib/authlete/model/trust-anchor.rb
|
153
|
+
- lib/authlete/types/application-type.rb
|
154
|
+
- lib/authlete/types/client-auth-method.rb
|
155
|
+
- lib/authlete/types/constant-utility.rb
|
156
|
+
- lib/authlete/types/delivery-mode.rb
|
157
|
+
- lib/authlete/types/grant-type.rb
|
158
|
+
- lib/authlete/types/jwealg.rb
|
159
|
+
- lib/authlete/types/jweenc.rb
|
160
|
+
- lib/authlete/types/jwsalg.rb
|
161
|
+
- lib/authlete/types/response-type.rb
|
162
|
+
- lib/authlete/types/subject-type.rb
|
152
163
|
- lib/authlete/utility.rb
|
153
164
|
- lib/authlete/version.rb
|
154
165
|
- test/authlete/model/request/test_authentication-callback-request.rb
|
@@ -221,11 +232,20 @@ files:
|
|
221
232
|
- test/authlete/model/test_tagged-value.rb
|
222
233
|
- test/authlete/model/test_trust-anchor.rb
|
223
234
|
- test/authlete/test_exception.rb
|
235
|
+
- test/authlete/types/test_application-type.rb
|
236
|
+
- test/authlete/types/test_client-auth-method.rb
|
237
|
+
- test/authlete/types/test_delivery-mode.rb
|
238
|
+
- test/authlete/types/test_grant-type.rb
|
239
|
+
- test/authlete/types/test_jwealg.rb
|
240
|
+
- test/authlete/types/test_jweenc.rb
|
241
|
+
- test/authlete/types/test_jwsalg.rb
|
242
|
+
- test/authlete/types/test_response-type.rb
|
243
|
+
- test/authlete/types/test_subject-type.rb
|
224
244
|
homepage: https://www.authlete.com/
|
225
245
|
licenses:
|
226
246
|
- Apache License, Version 2.0
|
227
247
|
metadata: {}
|
228
|
-
post_install_message:
|
248
|
+
post_install_message:
|
229
249
|
rdoc_options: []
|
230
250
|
require_paths:
|
231
251
|
- lib
|
@@ -240,8 +260,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
240
260
|
- !ruby/object:Gem::Version
|
241
261
|
version: '0'
|
242
262
|
requirements: []
|
243
|
-
rubygems_version: 3.
|
244
|
-
signing_key:
|
263
|
+
rubygems_version: 3.3.11
|
264
|
+
signing_key:
|
245
265
|
specification_version: 4
|
246
266
|
summary: A library for Authlete Web APIs
|
247
267
|
test_files:
|
@@ -315,3 +335,12 @@ test_files:
|
|
315
335
|
- test/authlete/model/test_tagged-value.rb
|
316
336
|
- test/authlete/model/test_trust-anchor.rb
|
317
337
|
- test/authlete/test_exception.rb
|
338
|
+
- test/authlete/types/test_application-type.rb
|
339
|
+
- test/authlete/types/test_client-auth-method.rb
|
340
|
+
- test/authlete/types/test_delivery-mode.rb
|
341
|
+
- test/authlete/types/test_grant-type.rb
|
342
|
+
- test/authlete/types/test_jwealg.rb
|
343
|
+
- test/authlete/types/test_jweenc.rb
|
344
|
+
- test/authlete/types/test_jwsalg.rb
|
345
|
+
- test/authlete/types/test_response-type.rb
|
346
|
+
- test/authlete/types/test_subject-type.rb
|