authlete 1.0.18 → 1.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/authlete/model/client-extension.rb +26 -2
- data/lib/authlete/version.rb +2 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d05bc797e012cd9d085820baf29c86a27083747b
|
4
|
+
data.tar.gz: ccd1cc418900d01677381f14668306f7c45ababe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19a89389ad3a2ad541179927a0f367a7c7bb5c5030a3387f626236f21fb7e6e2da3d3a99762104f51f1d0959ba84af11e226caa970d6347c0ac4978a65a00620
|
7
|
+
data.tar.gz: e9965322d5f6369ebba91fe70624cfccec1442e44fb0682a5fd5b97b767fce74fde22e156cc9ff56f51c40744054e82fcbddeb12b96f3b585c5b479e6f706519
|
@@ -22,7 +22,6 @@ module Authlete
|
|
22
22
|
module Model
|
23
23
|
class ClientExtension < Authlete::Model::Hashable
|
24
24
|
include Authlete::Utility
|
25
|
-
|
26
25
|
# The set of scopes that a client application is allowed to request.
|
27
26
|
# (String array)
|
28
27
|
attr_accessor :requestableScopes
|
@@ -36,8 +35,25 @@ module Authlete
|
|
36
35
|
alias_method :requestable_scopes_enabled, :requestableScopesEnabled
|
37
36
|
alias_method :requestable_scopes_enabled=, :requestableScopesEnabled=
|
38
37
|
|
38
|
+
# The duration of access tokens in seconds that are issued to a client.
|
39
|
+
# (Integer)
|
40
|
+
attr_accessor :accessTokenDuration
|
41
|
+
alias_method :access_token_duration, :accessTokenDuration
|
42
|
+
alias_method :access_token_duration=, :accessTokenDuration=
|
43
|
+
|
44
|
+
# The duration of refresh tokens in seconds that are issued to a client.
|
45
|
+
# (Integer)
|
46
|
+
attr_accessor :refreshTokenDuration
|
47
|
+
alias_method :refresh_token_duration, :refreshTokenDuration
|
48
|
+
alias_method :refresh_token_duration=, :refreshTokenDuration=
|
49
|
+
|
39
50
|
private
|
40
51
|
|
52
|
+
# Integer attributes.
|
53
|
+
INTEGER_ATTRIBUTES = ::Set.new([
|
54
|
+
:accessTokenDuration, :refreshTokenDuration
|
55
|
+
])
|
56
|
+
|
41
57
|
# Boolean attributes.
|
42
58
|
BOOLEAN_ATTRIBUTES = ::Set.new([
|
43
59
|
:requestableScopesEnabled
|
@@ -51,11 +67,18 @@ module Authlete
|
|
51
67
|
# Mapping from snake cases to camel cases.
|
52
68
|
SNAKE_TO_CAMEL = {
|
53
69
|
:requestable_scopes => :requestableScopes,
|
54
|
-
:requestable_scopes_enabled => :requestableScopesEnabled
|
70
|
+
:requestable_scopes_enabled => :requestableScopesEnabled,
|
71
|
+
:access_token_duration => :accessTokenDuration,
|
72
|
+
:refresh_token_duration => :refreshTokenDuration
|
55
73
|
}
|
56
74
|
|
57
75
|
# The constructor
|
58
76
|
def initialize(hash = nil)
|
77
|
+
# Set default values to integer attributes.
|
78
|
+
INTEGER_ATTRIBUTES.each do |attr|
|
79
|
+
send("#{attr}=", 0)
|
80
|
+
end
|
81
|
+
|
59
82
|
# Set default values to boolean attributes.
|
60
83
|
BOOLEAN_ATTRIBUTES.each do |attr|
|
61
84
|
send("#{attr}=", false)
|
@@ -82,6 +105,7 @@ module Authlete
|
|
82
105
|
end
|
83
106
|
|
84
107
|
def authlete_model_simple_attribute?(key)
|
108
|
+
INTEGER_ATTRIBUTES.include?(key) or
|
85
109
|
BOOLEAN_ATTRIBUTES.include?(key) or
|
86
110
|
STRING_ARRAY_ATTRIBUTES.include?(key)
|
87
111
|
end
|
data/lib/authlete/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authlete
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takahiko Kawasaki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|