authlete 0.5.1 → 1.0.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/lib/authlete.rb +24 -1
- data/lib/authlete/api.rb +298 -146
- data/lib/authlete/authentication-server.rb +1 -1
- data/lib/authlete/exception.rb +6 -3
- data/lib/authlete/model/client-extension.rb +135 -135
- data/lib/authlete/model/client-list.rb +128 -128
- data/lib/authlete/model/client.rb +468 -468
- data/lib/authlete/model/hashable.rb +1 -1
- data/lib/authlete/model/pair.rb +102 -102
- data/lib/authlete/model/property.rb +116 -0
- data/lib/authlete/model/request/authentication-callback-request.rb +90 -90
- data/lib/authlete/model/request/authorization-fail-request.rb +107 -104
- data/lib/authlete/model/request/authorization-issue-request.rb +167 -133
- data/lib/authlete/model/request/authorization-request.rb +101 -101
- data/lib/authlete/model/request/client-authorization-delete-request.rb +123 -0
- data/lib/authlete/model/request/client-authorization-get-list-request.rb +123 -0
- data/lib/authlete/model/request/client-authorization-update-request.rb +118 -0
- data/lib/authlete/model/request/client-secret-update-request.rb +121 -0
- data/lib/authlete/model/request/developer-authentication-callback-request.rb +84 -84
- data/lib/authlete/model/request/granted-scopes-request.rb +103 -0
- data/lib/authlete/model/request/introspection-request.rb +117 -39
- data/lib/authlete/model/request/revocation-request.rb +125 -0
- data/lib/authlete/model/request/standard-introspection-request.rb +102 -0
- data/lib/authlete/model/request/token-create-request.rb +250 -0
- data/lib/authlete/model/request/token-fail-request.rb +104 -101
- data/lib/authlete/model/request/token-issue-request.rb +116 -101
- data/lib/authlete/model/request/token-request.rb +127 -121
- data/lib/authlete/model/request/token-update-request.rb +165 -0
- data/lib/authlete/model/request/user-info-issue-request.rb +113 -0
- data/lib/authlete/model/request/user-info-request.rb +102 -0
- data/lib/authlete/model/response/authentication-callback-response.rb +53 -53
- data/lib/authlete/model/response/authorization-fail-response.rb +48 -48
- data/lib/authlete/model/response/authorization-issue-response.rb +85 -48
- data/lib/authlete/model/response/authorization-response.rb +177 -164
- data/lib/authlete/model/response/client-authorization-get-list-response.rb +60 -0
- data/lib/authlete/model/response/client-secret-refresh-response.rb +48 -0
- data/lib/authlete/model/response/client-secret-update-response.rb +48 -0
- data/lib/authlete/model/response/developer-authentication-callback-response.rb +55 -55
- data/lib/authlete/model/response/granted-scopes-get-response.rb +63 -0
- data/lib/authlete/model/response/introspection-response.rb +163 -132
- data/lib/authlete/model/response/revocation-response.rb +49 -0
- data/lib/authlete/model/response/service-creatable-response.rb +50 -50
- data/lib/authlete/model/response/standard-introspection-response.rb +49 -0
- data/lib/authlete/model/response/token-create-response.rb +100 -0
- data/lib/authlete/model/response/token-fail-response.rb +49 -49
- data/lib/authlete/model/response/token-issue-response.rb +138 -49
- data/lib/authlete/model/response/token-response.rb +168 -70
- data/lib/authlete/model/response/token-update-response.rb +62 -0
- data/lib/authlete/model/response/user-info-issue-response.rb +47 -0
- data/lib/authlete/model/response/user-info-response.rb +85 -0
- data/lib/authlete/model/result.rb +44 -44
- data/lib/authlete/model/scope.rb +1 -1
- data/lib/authlete/model/service-list.rb +1 -1
- data/lib/authlete/model/service-owner.rb +1 -1
- data/lib/authlete/model/service.rb +4 -2
- data/lib/authlete/model/sns-credentials.rb +1 -1
- data/lib/authlete/model/tagged-value.rb +97 -97
- data/lib/authlete/utility.rb +1 -1
- data/lib/authlete/version.rb +2 -2
- metadata +24 -2
@@ -1,49 +1,49 @@
|
|
1
|
-
# :nodoc:
|
2
|
-
#
|
3
|
-
# Copyright (C) 2014-
|
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 Model
|
20
|
-
module Response
|
21
|
-
# == Authlete::Model::Response::AuthorizationFailResponse class
|
22
|
-
#
|
23
|
-
# This class represents a response from Authlete's /api/auth/authorization/fail API.
|
24
|
-
class AuthorizationFailResponse < Authlete::Model::Result
|
25
|
-
# The next action that the service implementation should take.
|
26
|
-
# (String)
|
27
|
-
attr_accessor :action
|
28
|
-
|
29
|
-
# The response content which can be used to generate a response
|
30
|
-
# to the client application. The format of the value varies
|
31
|
-
# depending on the value of "action". (String)
|
32
|
-
attr_accessor :responseContent
|
33
|
-
alias_method :response_content, :responseContent
|
34
|
-
alias_method :response_content=, :responseContent=
|
35
|
-
|
36
|
-
private
|
37
|
-
|
38
|
-
# The constructor which takes a hash that represents a JSON response
|
39
|
-
# from Authlete's /api/auth/authorization/fail API.
|
40
|
-
def initialize(hash = {})
|
41
|
-
super(hash)
|
42
|
-
|
43
|
-
@action = extract_value(hash, :action)
|
44
|
-
@responseContent = extract_value(hash, :responseContent)
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
1
|
+
# :nodoc:
|
2
|
+
#
|
3
|
+
# Copyright (C) 2014-2018 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 Model
|
20
|
+
module Response
|
21
|
+
# == Authlete::Model::Response::AuthorizationFailResponse class
|
22
|
+
#
|
23
|
+
# This class represents a response from Authlete's /api/auth/authorization/fail API.
|
24
|
+
class AuthorizationFailResponse < Authlete::Model::Result
|
25
|
+
# The next action that the service implementation should take.
|
26
|
+
# (String)
|
27
|
+
attr_accessor :action
|
28
|
+
|
29
|
+
# The response content which can be used to generate a response
|
30
|
+
# to the client application. The format of the value varies
|
31
|
+
# depending on the value of "action". (String)
|
32
|
+
attr_accessor :responseContent
|
33
|
+
alias_method :response_content, :responseContent
|
34
|
+
alias_method :response_content=, :responseContent=
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
# The constructor which takes a hash that represents a JSON response
|
39
|
+
# from Authlete's /api/auth/authorization/fail API.
|
40
|
+
def initialize(hash = {})
|
41
|
+
super(hash)
|
42
|
+
|
43
|
+
@action = extract_value(hash, :action)
|
44
|
+
@responseContent = extract_value(hash, :responseContent)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
49
|
end
|
@@ -1,49 +1,86 @@
|
|
1
|
-
# :nodoc:
|
2
|
-
#
|
3
|
-
# Copyright (C) 2014-
|
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 Model
|
20
|
-
module Response
|
21
|
-
# == Authlete::Model::Response::AuthorizationIssueResponse class
|
22
|
-
#
|
23
|
-
# This class represents a response from Authlete's /api/auth/authorization/issue API.
|
24
|
-
class AuthorizationIssueResponse < Authlete::Model::Result
|
25
|
-
# The next action that the service implementation should take.
|
26
|
-
# (String)
|
27
|
-
attr_accessor :action
|
28
|
-
|
29
|
-
# The response content which can be used to generate a response
|
30
|
-
# to the client application. The format of the value varies
|
31
|
-
# depending on the value of "action". (String)
|
32
|
-
attr_accessor :responseContent
|
33
|
-
alias_method :response_content, :responseContent
|
34
|
-
alias_method :response_content=, :responseContent=
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
#
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
1
|
+
# :nodoc:
|
2
|
+
#
|
3
|
+
# Copyright (C) 2014-2018 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 Model
|
20
|
+
module Response
|
21
|
+
# == Authlete::Model::Response::AuthorizationIssueResponse class
|
22
|
+
#
|
23
|
+
# This class represents a response from Authlete's /api/auth/authorization/issue API.
|
24
|
+
class AuthorizationIssueResponse < Authlete::Model::Result
|
25
|
+
# The next action that the service implementation should take.
|
26
|
+
# (String)
|
27
|
+
attr_accessor :action
|
28
|
+
|
29
|
+
# The response content which can be used to generate a response
|
30
|
+
# to the client application. The format of the value varies
|
31
|
+
# depending on the value of "action". (String)
|
32
|
+
attr_accessor :responseContent
|
33
|
+
alias_method :response_content, :responseContent
|
34
|
+
alias_method :response_content=, :responseContent=
|
35
|
+
|
36
|
+
# The newly issued access token. Note that an access token is issued
|
37
|
+
# from an Authorization Endpoint only when "response_type" contains "token".
|
38
|
+
# (String)
|
39
|
+
attr_accessor :accessToken
|
40
|
+
alias_method :access_token, :accessToken
|
41
|
+
alias_method :access_token=, :accessToken=
|
42
|
+
|
43
|
+
# The datetime at which the newly issued access token will expire.
|
44
|
+
# The value is represented in milliseconds since the Unix epoch (1970-01-01).
|
45
|
+
# (Integer)
|
46
|
+
attr_accessor :accessTokenExpiresAt
|
47
|
+
alias_method :access_token_expires_at, :accessTokenExpiresAt
|
48
|
+
alias_method :access_token_expires_at=, :accessTokenExpiresAt=
|
49
|
+
|
50
|
+
# The duration of the newly issued access token in seconds. (Integer)
|
51
|
+
attr_accessor :accessTokenDuration
|
52
|
+
alias_method :access_token_duration, :accessTokenDuration
|
53
|
+
alias_method :access_token_duration=, :accessTokenDuration=
|
54
|
+
|
55
|
+
# The newly issued ID token. Note that an ID token is issued from
|
56
|
+
# an Authorization Endpoint only when "response_type" contains "id_token".
|
57
|
+
# (String)
|
58
|
+
attr_accessor :idToken
|
59
|
+
alias_method :id_token, :idToken
|
60
|
+
alias_method :id_token=, :idToken=
|
61
|
+
|
62
|
+
# The newly issued authorization code. Note that an authorization code
|
63
|
+
# is issued only when "response_type" contains "code". (String)
|
64
|
+
attr_accessor :authorizationCode
|
65
|
+
alias_method :authorization_code, :authorizationCode
|
66
|
+
alias_method :authorization_code=, :authorizationCode=
|
67
|
+
|
68
|
+
private
|
69
|
+
|
70
|
+
# The constructor which takes a hash that represents a JSON response
|
71
|
+
# from Authlete's /api/auth/authorization/issue API.
|
72
|
+
def initialize(hash = {})
|
73
|
+
super(hash)
|
74
|
+
|
75
|
+
@action = extract_value(hash, :action)
|
76
|
+
@responseContent = extract_value(hash, :responseContent)
|
77
|
+
@accessToken = extract_value(hash, :accessToken)
|
78
|
+
@accessTokenExpiresAt = extract_integer_value(hash, :accessTokenExpiresAt)
|
79
|
+
@accessTokenDuration = extract_integer_value(hash, :accessTokenDuration)
|
80
|
+
@idToken = extract_value(hash, :idToken)
|
81
|
+
@authorizationCode = extract_value(hash, :authorizationCode)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
49
86
|
end
|
@@ -1,165 +1,178 @@
|
|
1
|
-
# :nodoc:
|
2
|
-
#
|
3
|
-
# Copyright (C) 2014-
|
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 Model
|
20
|
-
module Response
|
21
|
-
# == Authlete::Model::Response::AuthorizationResponse class
|
22
|
-
#
|
23
|
-
# This class represents a response from Authlete's /api/auth/authorization API.
|
24
|
-
class AuthorizationResponse < Authlete::Model::Result
|
25
|
-
# The flag which indicates whether the end-user authentication
|
26
|
-
# must satisfy one of the requested ACRs. (BOOLEAN)
|
27
|
-
attr_accessor :acrEssential
|
28
|
-
alias_method :acr_essential, :acrEssential
|
29
|
-
alias_method :acr_essential=, :acrEssential=
|
30
|
-
|
31
|
-
# The list of ACRs (Authentication Context Class References)
|
32
|
-
# requested by the client application.
|
33
|
-
# The value come from (1) "acr" claim in "claims" request parameter,
|
34
|
-
# (2) "acr_values" request parameter or (3) "default_acr_values"
|
35
|
-
# configuration parameter of the client application.
|
36
|
-
# (String array)
|
37
|
-
attr_accessor :acrs
|
38
|
-
|
39
|
-
# The next action that the service implementation should take.
|
40
|
-
# (String)
|
41
|
-
attr_accessor :action
|
42
|
-
|
43
|
-
# The list of preferred languages and scripts for claim
|
44
|
-
# values contained in the ID token. The value comes from
|
45
|
-
# "claims_locales" request parameter. (String array)
|
46
|
-
attr_accessor :claimLocales
|
47
|
-
alias_method :claim_locales, :claimLocales
|
48
|
-
alias_method :claim_locales=, :claimLocales=
|
49
|
-
|
50
|
-
# The list of claims that the client application requests
|
51
|
-
# to be embedded in the ID token. The value comes from
|
52
|
-
# "scope" and "claims" request parameters of
|
53
|
-
# the original authorization request. (String array)
|
54
|
-
attr_accessor :claims
|
55
|
-
|
56
|
-
# The information about the client application which has made
|
57
|
-
# the authorization request. (Client)
|
58
|
-
attr_accessor :client
|
59
|
-
|
60
|
-
#
|
61
|
-
#
|
62
|
-
#
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
# The
|
68
|
-
#
|
69
|
-
#
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
# The
|
75
|
-
#
|
76
|
-
#
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
#
|
84
|
-
#
|
85
|
-
#
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
#
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
#
|
96
|
-
#
|
97
|
-
#
|
98
|
-
attr_accessor :
|
99
|
-
alias_method :
|
100
|
-
alias_method :
|
101
|
-
|
102
|
-
# The
|
103
|
-
#
|
104
|
-
attr_accessor :
|
105
|
-
|
106
|
-
# The
|
107
|
-
#
|
108
|
-
#
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
#
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
#
|
118
|
-
#
|
119
|
-
#
|
120
|
-
#
|
121
|
-
|
122
|
-
|
123
|
-
#
|
124
|
-
#
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
#
|
130
|
-
#
|
131
|
-
#
|
132
|
-
attr_accessor :
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
@
|
155
|
-
@
|
156
|
-
|
157
|
-
|
158
|
-
@
|
159
|
-
@
|
160
|
-
@
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
1
|
+
# :nodoc:
|
2
|
+
#
|
3
|
+
# Copyright (C) 2014-2018 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 Model
|
20
|
+
module Response
|
21
|
+
# == Authlete::Model::Response::AuthorizationResponse class
|
22
|
+
#
|
23
|
+
# This class represents a response from Authlete's /api/auth/authorization API.
|
24
|
+
class AuthorizationResponse < Authlete::Model::Result
|
25
|
+
# The flag which indicates whether the end-user authentication
|
26
|
+
# must satisfy one of the requested ACRs. (BOOLEAN)
|
27
|
+
attr_accessor :acrEssential
|
28
|
+
alias_method :acr_essential, :acrEssential
|
29
|
+
alias_method :acr_essential=, :acrEssential=
|
30
|
+
|
31
|
+
# The list of ACRs (Authentication Context Class References)
|
32
|
+
# requested by the client application.
|
33
|
+
# The value come from (1) "acr" claim in "claims" request parameter,
|
34
|
+
# (2) "acr_values" request parameter or (3) "default_acr_values"
|
35
|
+
# configuration parameter of the client application.
|
36
|
+
# (String array)
|
37
|
+
attr_accessor :acrs
|
38
|
+
|
39
|
+
# The next action that the service implementation should take.
|
40
|
+
# (String)
|
41
|
+
attr_accessor :action
|
42
|
+
|
43
|
+
# The list of preferred languages and scripts for claim
|
44
|
+
# values contained in the ID token. The value comes from
|
45
|
+
# "claims_locales" request parameter. (String array)
|
46
|
+
attr_accessor :claimLocales
|
47
|
+
alias_method :claim_locales, :claimLocales
|
48
|
+
alias_method :claim_locales=, :claimLocales=
|
49
|
+
|
50
|
+
# The list of claims that the client application requests
|
51
|
+
# to be embedded in the ID token. The value comes from
|
52
|
+
# "scope" and "claims" request parameters of
|
53
|
+
# the original authorization request. (String array)
|
54
|
+
attr_accessor :claims
|
55
|
+
|
56
|
+
# The information about the client application which has made
|
57
|
+
# the authorization request. (Client)
|
58
|
+
attr_accessor :client
|
59
|
+
|
60
|
+
# "true" if the value of the client_id request parameter included in
|
61
|
+
# the authorization request is the client ID alias. "false" if the
|
62
|
+
# value is the original numeric client ID.. (Boolean)
|
63
|
+
attr_accessor :clientIdAliasUsed
|
64
|
+
alias_method :client_id_alias_used, :clientIdAliasUsed
|
65
|
+
alias_method :client_id_alias_used=, :clientIdAliasUsed=
|
66
|
+
|
67
|
+
# The display mode which the client application requests
|
68
|
+
# by "display" request parameter. When the authorization
|
69
|
+
# request does not contain "display" request parameter,
|
70
|
+
# this method returns "PAGE" as the default value.
|
71
|
+
# (String)
|
72
|
+
attr_accessor :display
|
73
|
+
|
74
|
+
# The value of login hint, which is specified by the client
|
75
|
+
# application using "login_hint" request parameter.
|
76
|
+
# (String)
|
77
|
+
attr_accessor :loginHint
|
78
|
+
alias_method :login_hint, :loginHint
|
79
|
+
alias_method :login_hint=, :loginHint=
|
80
|
+
|
81
|
+
# The prompt that the UI displayed to the end-user must satisfy
|
82
|
+
# at least. The value comes from "prompt" request parameter.
|
83
|
+
# When the authorization request does not contain "prompt"
|
84
|
+
# parameter, this method returns "CONSENT CONSENT" as
|
85
|
+
# the default value. (String)
|
86
|
+
attr_accessor :lowestPrompt
|
87
|
+
alias_method :lowest_prompt, :lowestPrompt
|
88
|
+
alias_method :lowest_prompt=, :lowestPrompt=
|
89
|
+
|
90
|
+
# The maximum authentication age which is the allowable
|
91
|
+
# elapsed time in seconds since the last time the end-user
|
92
|
+
# was actively authenticated by the service implementation.
|
93
|
+
# The value comes from "max_age" request parameter
|
94
|
+
# or "default_max_age" configuration parameter of
|
95
|
+
# the client application. 0 may be returned which means
|
96
|
+
# that the max age constraint does not have to be imposed.
|
97
|
+
# (Integer)
|
98
|
+
attr_accessor :maxAge
|
99
|
+
alias_method :max_age, :maxAge
|
100
|
+
alias_method :max_age=, :maxAge=
|
101
|
+
|
102
|
+
# The list of values of prompt request parameter. Possible element
|
103
|
+
# values are "CONSENT", "LOGIN", "SELECT_ACCOUNT" and "NONE". (String array)
|
104
|
+
attr_accessor :prompts
|
105
|
+
|
106
|
+
# The response content which can be used to generate a response
|
107
|
+
# to the client application. The format of the value varies
|
108
|
+
# depending on the value of "action". (String)
|
109
|
+
attr_accessor :responseContent
|
110
|
+
alias_method :response_content, :responseContent
|
111
|
+
alias_method :response_content=, :responseContent=
|
112
|
+
|
113
|
+
# The information about the service to which the authorization request
|
114
|
+
# has been made. (Service)
|
115
|
+
attr_accessor :service
|
116
|
+
|
117
|
+
# The scopes which the client application requests by "scope"
|
118
|
+
# request parameter. When the authorization request does
|
119
|
+
# not contain "scope" request parameter, this method
|
120
|
+
# returns a list of scopes which are marked as default by the
|
121
|
+
# service implementation. "nil" may be returned if the
|
122
|
+
# authorization request does not contain valid scopes and none
|
123
|
+
# of registered scopes is marked as default.
|
124
|
+
# (Scope array)
|
125
|
+
attr_accessor :scopes
|
126
|
+
|
127
|
+
# The subject (= end-user's login ID) that the client
|
128
|
+
# application requests. The value comes from "sub"
|
129
|
+
# claim in "claims" request parameter. This method
|
130
|
+
# may return "nil" (probably in most cases).
|
131
|
+
# (String)
|
132
|
+
attr_accessor :subject
|
133
|
+
|
134
|
+
# The ticket which has been issued to the service implementation
|
135
|
+
# from Authlete's /api/auth/authorization API. This ticket is
|
136
|
+
# needed for /api/auth/authorization/issue API and
|
137
|
+
# /api/auth/authorization/fail API. (String)
|
138
|
+
attr_accessor :ticket
|
139
|
+
|
140
|
+
# The list of preferred languages and scripts for the user
|
141
|
+
# interface. The value comes from "ui_locales" request
|
142
|
+
# parameter. (String array)
|
143
|
+
attr_accessor :uiLocales
|
144
|
+
alias_method :ui_locales, :uiLocales
|
145
|
+
alias_method :ui_locales=, :uiLocales=
|
146
|
+
|
147
|
+
private
|
148
|
+
|
149
|
+
# The constructor which takes a hash that represents a JSON response
|
150
|
+
# from Authlete's /api/auth/authorization API.
|
151
|
+
def initialize(hash = {})
|
152
|
+
super(hash)
|
153
|
+
|
154
|
+
@acrEssential = extract_value(hash, :acrEssential)
|
155
|
+
@acrs = extract_value(hash, :acrs)
|
156
|
+
@action = extract_value(hash, :action)
|
157
|
+
@claimLocales = extract_value(hash, :claimLocales)
|
158
|
+
@claims = extract_value(hash, :claims)
|
159
|
+
@client = Authlete::Model::Client.new(extract_value(hash, :client))
|
160
|
+
@clientIdAliasUsed = extract_boolean_value(hash, :clientIdAliasUsed)
|
161
|
+
@display = extract_value(hash, :display)
|
162
|
+
@loginHint = extract_value(hash, :loginHint)
|
163
|
+
@lowestPrompt = extract_value(hash, :lowestPrompt)
|
164
|
+
@maxAge = extract_integer_value(hash, :maxAge)
|
165
|
+
@prompts = extract_value(hash, :prompts)
|
166
|
+
@responseContent = extract_value(hash, :responseContent)
|
167
|
+
@service = Authlete::Model::Service.new(extract_value(hash, :service))
|
168
|
+
@scopes = extract_array_value(hash, :scopes) do |element|
|
169
|
+
Authlete::Model::Scope.parse(element)
|
170
|
+
end
|
171
|
+
@subject = extract_value(hash, :subject)
|
172
|
+
@ticket = extract_value(hash, :ticket)
|
173
|
+
@uiLocales = extract_value(hash, :uiLocales)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
end
|
177
|
+
end
|
165
178
|
end
|