authlete 1.26.1 → 1.27.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.
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69f45d3c1632656ee8110567b764075c4cc484b2590e370bff3bfe740582cc6e
|
4
|
+
data.tar.gz: '06548ccc3cc91609a7dd78ab98baae2187c9dda0c3284db5ef4fe74a4abbfdef'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: feda552048bd061d4c1a5a9a4236f2aa5261919b6764c0abda706e2d6142fc43378543ec77643d817beeba890a42fd05672e7df52e2aa483830e4537d1abb1ea
|
7
|
+
data.tar.gz: 41042c43f9205854650fc059c0e52485e53d412b861f3b34aae14df6e492e786216956930a86dceeadb90ebe5bafb32ad2b4be96745ab2f2f3406d83b17206c2
|
data/authlete.gemspec
CHANGED
@@ -6,7 +6,7 @@ require 'authlete/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "authlete"
|
8
8
|
spec.version = Authlete::VERSION
|
9
|
-
spec.authors = ["Takahiko Kawasaki", "Hideki Ikeda"]
|
9
|
+
spec.authors = ["Takahiko Kawasaki", "Hideki Ikeda", "Seth Wright"]
|
10
10
|
spec.email = ["admin@authlete.com"]
|
11
11
|
spec.summary = "A library for Authlete Web APIs"
|
12
12
|
spec.description = "A library for Authlete Web APIs. See https://docs.authlete.com/ for details."
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# :nodoc:
|
2
2
|
#
|
3
|
-
# Copyright (C) 2014-
|
3
|
+
# Copyright (C) 2014-2022 Authlete, Inc.
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
6
|
# you may not use this file except in compliance with the License.
|
@@ -15,6 +15,9 @@
|
|
15
15
|
# limitations under the License.
|
16
16
|
|
17
17
|
|
18
|
+
require 'json'
|
19
|
+
|
20
|
+
|
18
21
|
module Authlete
|
19
22
|
module Model
|
20
23
|
class Client < Authlete::Model::Base
|
@@ -502,6 +505,121 @@ module Authlete
|
|
502
505
|
raw_val
|
503
506
|
end
|
504
507
|
end
|
508
|
+
|
509
|
+
public
|
510
|
+
|
511
|
+
def standard_metadata(delete_zero = true, delete_false = true, delete_nil = true)
|
512
|
+
metadata = {
|
513
|
+
client_id: "#{@clientId}",
|
514
|
+
redirect_uris: @redirectUris,
|
515
|
+
response_types: standard_response_types(@responseTypes),
|
516
|
+
grant_types: standard_grant_types(@grantTypes),
|
517
|
+
application_type: from_application_type(@applicationType),
|
518
|
+
contacts: @contacts,
|
519
|
+
client_name: @clientName,
|
520
|
+
logo_uri: @logoUri,
|
521
|
+
client_uri: @clientUri,
|
522
|
+
policy_uri: @policyUri,
|
523
|
+
tos_uri: @tosUri,
|
524
|
+
jwks_uri: @jwksUri,
|
525
|
+
jwks: json_parse(@jwks),
|
526
|
+
sector_identifier_uri: @sectorIdentifierUri,
|
527
|
+
subject_type: from_subject_type(@subjectType),
|
528
|
+
id_token_signed_response_alg: from_jwsalg(@idTokenSignAlg),
|
529
|
+
id_token_encrypted_response_alg: from_jwealg(@idTokenEncryptionAlg),
|
530
|
+
id_token_encrypted_response_enc: from_jweenc(@idTokenEncryptionEnc),
|
531
|
+
userinfo_signed_response_alg: from_jwsalg(@userInfoSignAlg),
|
532
|
+
userinfo_encrypted_response_alg: from_jwealg(@userInfoEncryptionAlg),
|
533
|
+
userinfo_encrypted_response_enc: from_jweenc(@userInfoEncryptionEnc),
|
534
|
+
request_object_signing_alg: from_jwsalg(@requestSignAlg),
|
535
|
+
request_object_encryption_alg: from_jwealg(@requestEncryptionAlg),
|
536
|
+
request_object_encryption_enc: from_jweenc(@requestEncryptionEnc),
|
537
|
+
token_endpoint_auth_method: from_client_auth_method(@tokenAuthMethod),
|
538
|
+
token_endpoint_auth_signing_alg: from_jwsalg(@tokenAuthSignAlg),
|
539
|
+
default_max_age: @defaultMaxAge,
|
540
|
+
default_acr_values: @defaultAcrs,
|
541
|
+
require_auth_time: @authTimeRequired,
|
542
|
+
initiate_login_uri: @loginUri,
|
543
|
+
request_uris: @requestUris,
|
544
|
+
tls_client_auth_subject_dn: @tlsClientAuthSubjectDn,
|
545
|
+
tls_client_auth_san_dns: @tlsClientAuthSanDns,
|
546
|
+
tls_client_auth_san_uri: @tlsClientAuthSanUri,
|
547
|
+
tls_client_auth_san_ip: @tlsClientAuthSanIp,
|
548
|
+
tls_client_auth_san_email: @tlsClientAuthSanEmail,
|
549
|
+
tls_client_certificate_bound_access_tokens: @tlsClientCertificateBoundAccessTokens,
|
550
|
+
software_id: @softwareId,
|
551
|
+
software_version: @softwareVersion,
|
552
|
+
authorization_signed_response_alg: from_jwsalg(@authorizationSignAlg),
|
553
|
+
authorization_encrypted_response_alg: from_jwealg(@authorizationEncryptionAlg),
|
554
|
+
authorization_encrypted_response_enc: from_jweenc(@authorizationEncryptionEnc),
|
555
|
+
backchannel_token_delivery_mode: from_delivery_mode(@bcDeliveryMode),
|
556
|
+
backchannel_client_notification_endpoint: @bcNotificationEndpoint,
|
557
|
+
backchannel_authentication_request_signing_alg: from_jwsalg(@bcRequestSignAlg),
|
558
|
+
backchannel_user_code_parameter: @bcUserCodeRequired,
|
559
|
+
authorization_details_types: @authorizationDetailsTypes,
|
560
|
+
digest_algorithm: @digestAlgorithm
|
561
|
+
}
|
562
|
+
|
563
|
+
if delete_nil
|
564
|
+
metadata.compact!
|
565
|
+
end
|
566
|
+
|
567
|
+
if delete_false
|
568
|
+
metadata = metadata.delete_if {|key, value| value == false}
|
569
|
+
end
|
570
|
+
|
571
|
+
if delete_zero
|
572
|
+
metadata = metadata.delete_if {|key, value| value == 0}
|
573
|
+
end
|
574
|
+
|
575
|
+
metadata
|
576
|
+
end
|
577
|
+
|
578
|
+
private
|
579
|
+
|
580
|
+
def standard_response_types(array)
|
581
|
+
array.nil? ? nil : array.map do |element|
|
582
|
+
Authlete::Types::ResponseType::constant_get(element)
|
583
|
+
end
|
584
|
+
end
|
585
|
+
|
586
|
+
def standard_grant_types(array)
|
587
|
+
array.nil? ? nil : array.map do |element|
|
588
|
+
Authlete::Types::GrantType::constant_get(element)
|
589
|
+
end
|
590
|
+
end
|
591
|
+
|
592
|
+
def json_parse(json)
|
593
|
+
json.nil? ? nil : JSON.parse(json)
|
594
|
+
end
|
595
|
+
|
596
|
+
def from_application_type(constant_name)
|
597
|
+
Authlete::Types::ApplicationType::constant_get(constant_name)
|
598
|
+
end
|
599
|
+
|
600
|
+
def from_client_auth_method(constant_name)
|
601
|
+
Authlete::Types::ClientAuthMethod::constant_get(constant_name)
|
602
|
+
end
|
603
|
+
|
604
|
+
def from_delivery_mode(constant_name)
|
605
|
+
Authlete::Types::DeliveryMode::constant_get(constant_name)
|
606
|
+
end
|
607
|
+
|
608
|
+
def from_jwealg(constant_name)
|
609
|
+
Authlete::Types::JWEAlg::constant_get(constant_name)
|
610
|
+
end
|
611
|
+
|
612
|
+
def from_jweenc(constant_name)
|
613
|
+
Authlete::Types::JWEEnc::constant_get(constant_name)
|
614
|
+
end
|
615
|
+
|
616
|
+
def from_jwsalg(constant_name)
|
617
|
+
Authlete::Types::JWSAlg::constant_get(constant_name)
|
618
|
+
end
|
619
|
+
|
620
|
+
def from_subject_type(constant_name)
|
621
|
+
Authlete::Types::SubjectType::constant_get(constant_name)
|
622
|
+
end
|
505
623
|
end
|
506
624
|
end
|
507
625
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# :nodoc:
|
2
2
|
#
|
3
|
-
# Copyright (C) 2014-
|
3
|
+
# Copyright (C) 2014-2022 Authlete, Inc.
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
6
|
# you may not use this file except in compliance with the License.
|
@@ -607,6 +607,10 @@ module Authlete
|
|
607
607
|
alias_method :dcr_duplicate_software_id_blocked, :dcrDuplicateSoftwareIdBlocked
|
608
608
|
alias_method :dcr_duplicate_software_id_blocked=, :dcrDuplicateSoftwareIdBlocked=
|
609
609
|
|
610
|
+
attr_accessor :openidDroppedOnRefreshWithoutOfflineAccess
|
611
|
+
alias_method :openid_dropped_on_refresh_without_offline_access, :openidDroppedOnRefreshWithoutOfflineAccess
|
612
|
+
alias_method :openid_dropped_on_refresh_without_offline_access=, :openidDroppedOnRefreshWithoutOfflineAccess=
|
613
|
+
|
610
614
|
private
|
611
615
|
|
612
616
|
def defaults
|
@@ -761,6 +765,7 @@ module Authlete
|
|
761
765
|
federationSignatureKeyId: nil,
|
762
766
|
federationConfigurationDuration: 0,
|
763
767
|
dcrDuplicateSoftwareIdBlocked: false,
|
768
|
+
openidDroppedOnRefreshWithoutOfflineAccess: false,
|
764
769
|
}
|
765
770
|
end
|
766
771
|
|
@@ -915,6 +920,7 @@ module Authlete
|
|
915
920
|
@federationSignatureKeyId = hash[:federationSignatureKeyId]
|
916
921
|
@federationConfigurationDuration = hash[:federationConfigurationDuration]
|
917
922
|
@dcrDuplicateSoftwareIdBlocked = hash[:dcrDuplicateSoftwareIdBlocked]
|
923
|
+
@openidDroppedOnRefreshWithoutOfflineAccess = hash[:openidDroppedOnRefreshWithoutOfflineAccess]
|
918
924
|
|
919
925
|
end
|
920
926
|
|
@@ -0,0 +1,27 @@
|
|
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
|
+
module Authlete
|
19
|
+
module Types
|
20
|
+
module ApplicationType
|
21
|
+
extend Authlete::Types::ConstantUtility
|
22
|
+
|
23
|
+
WEB = "web"
|
24
|
+
NATIVE = "native"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,32 @@
|
|
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
|
+
module Authlete
|
19
|
+
module Types
|
20
|
+
module ClientAuthMethod
|
21
|
+
extend Authlete::Types::ConstantUtility
|
22
|
+
|
23
|
+
NONE = "none"
|
24
|
+
CLIENT_SECRET_BASIC = "client_secret_basic"
|
25
|
+
CLIENT_SECRET_POST = "client_secret_post"
|
26
|
+
CLIENT_SECRET_JWT = "client_secret_jwt"
|
27
|
+
PRIVATE_KEY_JWT = "private_key_jwt"
|
28
|
+
TLS_CLIENT_AUTH = "tls_client_auth"
|
29
|
+
SELF_SIGNED_TLS_CLIENT_AUTH = "self_signed_tls_client_auth"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,34 @@
|
|
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
|
+
module Authlete
|
19
|
+
module Types
|
20
|
+
module ConstantUtility
|
21
|
+
def constant_get(constant_name)
|
22
|
+
if constant_name.nil?
|
23
|
+
return nil
|
24
|
+
end
|
25
|
+
|
26
|
+
begin
|
27
|
+
const_get(constant_name)
|
28
|
+
rescue
|
29
|
+
nil
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,28 @@
|
|
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
|
+
module Authlete
|
19
|
+
module Types
|
20
|
+
module DeliveryMode
|
21
|
+
extend Authlete::Types::ConstantUtility
|
22
|
+
|
23
|
+
POLL = "poll"
|
24
|
+
PING = "ping"
|
25
|
+
PUSH = "push"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,34 @@
|
|
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
|
+
module Authlete
|
19
|
+
module Types
|
20
|
+
module GrantType
|
21
|
+
extend Authlete::Types::ConstantUtility
|
22
|
+
|
23
|
+
AUTHORIZATION_CODE = "authorization_code"
|
24
|
+
IMPLICIT = "implicit"
|
25
|
+
PASSWORD = "password"
|
26
|
+
CLIENT_CREDENTIALS = "client_credentials"
|
27
|
+
REFRESH_TOKEN = "refresh_token"
|
28
|
+
CIBA = "urn:openid:params:grant-type:ciba"
|
29
|
+
DEVICE_CODE = "urn:ietf:params:oauth:grant-type:device_code"
|
30
|
+
TOKEN_EXCHANGE = "urn:ietf:params:oauth:grant-type:token-exchange"
|
31
|
+
JWT_BEARER = "urn:ietf:params:oauth:grant-type:jwt-bearer"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,42 @@
|
|
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
|
+
module Authlete
|
19
|
+
module Types
|
20
|
+
module JWEAlg
|
21
|
+
extend Authlete::Types::ConstantUtility
|
22
|
+
|
23
|
+
RSA1_5 = "RSA1_5"
|
24
|
+
RSA_OAEP = "RSA-OAEP"
|
25
|
+
RSA_OAEP_256 = "RSA-OAEP-256"
|
26
|
+
A128KW = "A128KW"
|
27
|
+
A192KW = "A192KW"
|
28
|
+
A256KW = "A256KW"
|
29
|
+
DIR = "dir"
|
30
|
+
ECDH_ES = "ECDH-ES"
|
31
|
+
ECDH_ES_A128KW = "ECDH-ES+A128KW"
|
32
|
+
ECDH_ES_A192KW = "ECDH-ES+A192KW"
|
33
|
+
ECDH_ES_A256KW = "ECDH-ES+A256KW"
|
34
|
+
A128GCMKW = "A128GCMKW"
|
35
|
+
A192GCMKW = "A192GCMKW"
|
36
|
+
A256GCMKW = "A256GCMKW"
|
37
|
+
PBES2_HS256_A128KW = "PBES2-HS256+A128KW"
|
38
|
+
PBES2_HS384_A192KW = "PBES2-HS384+A192KW"
|
39
|
+
PBES2_HS512_A256KW = "PBES2-HS512+A256KW"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,31 @@
|
|
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
|
+
module Authlete
|
19
|
+
module Types
|
20
|
+
module JWEEnc
|
21
|
+
extend Authlete::Types::ConstantUtility
|
22
|
+
|
23
|
+
A128CBC_HS256 = "A128CBC-HS256"
|
24
|
+
A192CBC_HS384 = "A192CBC-HS384"
|
25
|
+
A256CBC_HS512 = "A256CBC-HS512"
|
26
|
+
A128GCM = "A128GCM"
|
27
|
+
A192GCM = "A192GCM"
|
28
|
+
A256GCM = "A256GCM"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,40 @@
|
|
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
|
+
module Authlete
|
19
|
+
module Types
|
20
|
+
module JWSAlg
|
21
|
+
extend Authlete::Types::ConstantUtility
|
22
|
+
|
23
|
+
NONE = "none"
|
24
|
+
HS256 = "HS256"
|
25
|
+
HS384 = "HS384"
|
26
|
+
HS512 = "HS512"
|
27
|
+
RS256 = "RS256"
|
28
|
+
RS384 = "RS384"
|
29
|
+
RS512 = "RS512"
|
30
|
+
ES256 = "ES256"
|
31
|
+
ES384 = "ES384"
|
32
|
+
ES512 = "ES512"
|
33
|
+
PS256 = "PS256"
|
34
|
+
PS384 = "PS384"
|
35
|
+
PS512 = "PS512"
|
36
|
+
ES256K = "ES256K"
|
37
|
+
EdDSA = "EdDSA"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,33 @@
|
|
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
|
+
module Authlete
|
19
|
+
module Types
|
20
|
+
module ResponseType
|
21
|
+
extend Authlete::Types::ConstantUtility
|
22
|
+
|
23
|
+
NONE = "none"
|
24
|
+
CODE = "code"
|
25
|
+
TOKEN = "token"
|
26
|
+
ID_TOKEN = "id_token"
|
27
|
+
CODE_TOKEN = "code token"
|
28
|
+
CODE_ID_TOKEN = "code id_token"
|
29
|
+
ID_TOKEN_TOKEN = "id_token token"
|
30
|
+
CODE_ID_TOKEN_TOKEN = "code id_token token"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,27 @@
|
|
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
|
+
module Authlete
|
19
|
+
module Types
|
20
|
+
module SubjectType
|
21
|
+
extend Authlete::Types::ConstantUtility
|
22
|
+
|
23
|
+
PUBLIC = "public"
|
24
|
+
PAIRWISE = "pairwise"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/authlete/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# :nodoc:
|
2
2
|
#
|
3
|
-
# Copyright (C) 2014-
|
3
|
+
# Copyright (C) 2014-2022 Authlete, Inc.
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
6
|
# you may not use this file except in compliance with the License.
|
@@ -16,5 +16,5 @@
|
|
16
16
|
|
17
17
|
|
18
18
|
module Authlete
|
19
|
-
VERSION = "1.
|
19
|
+
VERSION = "1.27.0"
|
20
20
|
end
|
data/lib/authlete.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# :nodoc:
|
2
2
|
#
|
3
|
-
# Copyright (C) 2014-
|
3
|
+
# Copyright (C) 2014-2022 Authlete, Inc.
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
6
|
# you may not use this file except in compliance with the License.
|
@@ -111,4 +111,17 @@ module Authlete
|
|
111
111
|
autoload :UserInfoResponse, 'authlete/model/response/user-info-response'
|
112
112
|
end
|
113
113
|
end
|
114
|
+
|
115
|
+
module Types
|
116
|
+
autoload :ApplicationType, 'authlete/types/application-type'
|
117
|
+
autoload :ClientAuthMethod, 'authlete/types/client-auth-method'
|
118
|
+
autoload :ConstantUtility, 'authlete/types/constant-utility'
|
119
|
+
autoload :DeliveryMode, 'authlete/types/delivery-mode'
|
120
|
+
autoload :GrantType, 'authlete/types/grant-type'
|
121
|
+
autoload :JWEAlg, 'authlete/types/jwealg'
|
122
|
+
autoload :JWEEnc, 'authlete/types/jweenc'
|
123
|
+
autoload :JWSAlg, 'authlete/types/jwsalg'
|
124
|
+
autoload :ResponseType, 'authlete/types/response-type'
|
125
|
+
autoload :SubjectType, 'authlete/types/subject-type'
|
126
|
+
end
|
114
127
|
end
|