authlete 0.5.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,71 +1,169 @@
|
|
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::TokenResponse class
|
22
|
-
#
|
23
|
-
# This class represents a response from Authlete's /api/auth/token API.
|
24
|
-
class TokenResponse < Authlete::Model::Result
|
25
|
-
include Authlete::Utility
|
26
|
-
# The next action that the service implementation should take.
|
27
|
-
# (String)
|
28
|
-
attr_accessor :action
|
29
|
-
|
30
|
-
# The
|
31
|
-
#
|
32
|
-
#
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
#
|
38
|
-
#
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
# The
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
attr_accessor :
|
48
|
-
|
49
|
-
# The
|
50
|
-
#
|
51
|
-
#
|
52
|
-
#
|
53
|
-
attr_accessor :
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
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::TokenResponse class
|
22
|
+
#
|
23
|
+
# This class represents a response from Authlete's /api/auth/token API.
|
24
|
+
class TokenResponse < Authlete::Model::Result
|
25
|
+
include Authlete::Utility
|
26
|
+
# The next action that the service implementation should take.
|
27
|
+
# (String)
|
28
|
+
attr_accessor :action
|
29
|
+
|
30
|
+
# The response content which can be used to generate a response
|
31
|
+
# to the client application. The format of the value varies
|
32
|
+
# depending on the value of "action". (String)
|
33
|
+
attr_accessor :responseContent
|
34
|
+
alias_method :response_content, :responseContent
|
35
|
+
alias_method :response_content=, :responseContent=
|
36
|
+
|
37
|
+
# The value of "username" request parameter.
|
38
|
+
#
|
39
|
+
# This value is non-nil only when the value of
|
40
|
+
# "grant_type" request parameter in the token request is "password".
|
41
|
+
attr_accessor :username
|
42
|
+
|
43
|
+
# The value of "password" request parameter.
|
44
|
+
#
|
45
|
+
# This value is non-nil only when the value of
|
46
|
+
# "grant_type" request parameter in the token request is "password".
|
47
|
+
attr_accessor :password
|
48
|
+
|
49
|
+
# The ticket issued from Authlete's /api/auth/token endpoint.
|
50
|
+
# This parameter is to be used as "ticket" request parameter
|
51
|
+
# for /api/auth/token/issue API or /api/auth/token/fail API.
|
52
|
+
# This parameter is non-nil only when "action" is "PASSWORD PASSWORD".
|
53
|
+
attr_accessor :ticket
|
54
|
+
|
55
|
+
# The newly issued access token. (String)
|
56
|
+
attr_accessor :accessToken
|
57
|
+
alias_method :access_token, :accessToken
|
58
|
+
alias_method :access_token=, :accessToken=
|
59
|
+
|
60
|
+
# The datetime at which the newly issued access token will expire.
|
61
|
+
# The value is represented in milliseconds since the Unix epoch (1970-01-01).
|
62
|
+
# (Integer)
|
63
|
+
attr_accessor :accessTokenExpiresAt
|
64
|
+
alias_method :access_token_expires_at, :accessTokenExpiresAt
|
65
|
+
alias_method :access_token_expires_at=, :accessTokenExpiresAt=
|
66
|
+
|
67
|
+
# The duration of the newly issued access token in seconds. (Integer)
|
68
|
+
attr_accessor :accessTokenDuration
|
69
|
+
alias_method :access_token_duration, :accessTokenDuration
|
70
|
+
alias_method :access_token_duration=, :accessTokenDuration=
|
71
|
+
|
72
|
+
# The newly issued refresh token. (String)
|
73
|
+
attr_accessor :refreshToken
|
74
|
+
alias_method :refresh_token, :refreshToken
|
75
|
+
alias_method :refresh_token=, :refreshToken=
|
76
|
+
|
77
|
+
# The datetime at which the newly issued refresh token will expire.
|
78
|
+
# The value is represented in milliseconds since the Unix epoch (1970-01-01).
|
79
|
+
# (Integer)
|
80
|
+
attr_accessor :refreshTokenExpiresAt
|
81
|
+
alias_method :refresh_token_expires_at, :refreshTokenExpiresAt
|
82
|
+
alias_method :refresh_token_expires_at=, :refreshTokenExpiresAt=
|
83
|
+
|
84
|
+
# The duration of the newly issued refresh token in seconds. (Integer)
|
85
|
+
attr_accessor :refreshTokenDuration
|
86
|
+
alias_method :refresh_token_duration, :refreshTokenDuration
|
87
|
+
alias_method :refresh_token_duration=, :refreshTokenDuration=
|
88
|
+
|
89
|
+
# The newly issued ID token. Note that an ID token is issued from
|
90
|
+
# a Token Endpoint only when the "response_type" request parameter
|
91
|
+
# of the authorization request to an Authorization Endpoint has contained
|
92
|
+
# "code" and the "scope" request parameter has contained "openid".
|
93
|
+
# (String)
|
94
|
+
attr_accessor :idToken
|
95
|
+
alias_method :id_token, :idToken
|
96
|
+
alias_method :id_token=, :idToken=
|
97
|
+
|
98
|
+
# The grant type of the token request. (String)
|
99
|
+
attr_accessor :grantType
|
100
|
+
alias_method :grant_type, :grantType
|
101
|
+
alias_method :grant_type=, :grantType=
|
102
|
+
|
103
|
+
# The client ID. (Integer)
|
104
|
+
attr_accessor :clientId
|
105
|
+
alias_method :client_id, :clientId
|
106
|
+
alias_method :client_id=, :clientId=
|
107
|
+
|
108
|
+
# Alias of client ID. (String)
|
109
|
+
attr_accessor :clientIdAlias
|
110
|
+
alias_method :client_id_alias, :clientIdAlias
|
111
|
+
alias_method :client_id_alias=, :clientIdAlias=
|
112
|
+
|
113
|
+
# The flag which indicates whether the client ID alias was used when
|
114
|
+
# the token request was made. "true" if the client ID alias was used
|
115
|
+
# when the token request was made. (Boolean)
|
116
|
+
attr_accessor :clientIdAliasUsed
|
117
|
+
alias_method :client_id_alias_used, :clientIdAliasUsed
|
118
|
+
alias_method :client_id_alias_used=, :clientIdAliasUsed=
|
119
|
+
|
120
|
+
# The subject (= resource owner's ID) of the access token.
|
121
|
+
# Even if an access token has been issued by the call of /api/auth/token API,
|
122
|
+
# this parameter is "nil" if the flow of the token request was "Client Credentials Flow"
|
123
|
+
# (grant_type=client_credentials) because it means the access token
|
124
|
+
# is not associated with any specific end-user.
|
125
|
+
# (String)
|
126
|
+
attr_accessor :subject
|
127
|
+
|
128
|
+
# The scopes covered by the access token.
|
129
|
+
# (Scope array)
|
130
|
+
attr_accessor :scopes
|
131
|
+
|
132
|
+
# The extra properties associated with the access token.
|
133
|
+
# This parameter is "nil" when no extra property is associated with
|
134
|
+
# the issued access token.
|
135
|
+
attr_accessor :properties
|
136
|
+
|
137
|
+
private
|
138
|
+
|
139
|
+
# The constructor which takes a hash that represents a JSON response
|
140
|
+
# from Authlete's /api/auth/token API.
|
141
|
+
def initialize(hash = {})
|
142
|
+
super(hash)
|
143
|
+
|
144
|
+
@action = extract_value(hash, :action)
|
145
|
+
@responseContent = extract_value(hash, :responseContent)
|
146
|
+
@username = extract_value(hash, :username)
|
147
|
+
@password = extract_value(hash, :password)
|
148
|
+
@ticket = extract_value(hash, :ticket)
|
149
|
+
@accessToken = extract_value(hash, :accessToken)
|
150
|
+
@accessTokenExpiresAt = extract_integer_value(hash, :accessTokenExpiresAt)
|
151
|
+
@accessTokenDuration = extract_integer_value(hash, :accessTokenDuration)
|
152
|
+
@refreshToken = extract_value(hash, :refreshToken)
|
153
|
+
@refreshTokenExpiresAt = extract_integer_value(hash, :refreshTokenExpiresAt)
|
154
|
+
@refreshTokenDuration = extract_integer_value(hash, :refreshTokenDuration)
|
155
|
+
@idToken = extract_value(hash, :idToken)
|
156
|
+
@grantType = extract_value(hash, :grantType)
|
157
|
+
@clientId = extract_integer_value(hash, :clientId)
|
158
|
+
@clientIdAlias = extract_value(hash, :clientIdAlias)
|
159
|
+
@clientIdAliasUsed = extract_boolean_value(hash, :clientIdAliasUsed)
|
160
|
+
@subject = extract_value(hash, :subject)
|
161
|
+
@scopes = extract_value(hash, :scopes)
|
162
|
+
@properties = extract_array_value(hash, :scopes) do |element|
|
163
|
+
Authlete::Model::Property.parse(element)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|
71
169
|
end
|
@@ -0,0 +1,62 @@
|
|
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::TokenUpdateResponse class
|
22
|
+
#
|
23
|
+
# A class that represents a response from Authlete's
|
24
|
+
# /api/auth/token/update API.
|
25
|
+
class TokenUpdateResponse < Authlete::Model::Result
|
26
|
+
# The next action which the caller of the API should take next.
|
27
|
+
# (String)
|
28
|
+
attr_accessor :action
|
29
|
+
|
30
|
+
# The access token which has been specified by the request. (String)
|
31
|
+
attr_accessor :accessToken
|
32
|
+
alias_method :access_token, :accessToken
|
33
|
+
alias_method :access_token=, :accessToken=
|
34
|
+
|
35
|
+
# The date at which the access token will expire. (Integer)
|
36
|
+
attr_accessor :accessTokenExpiresAt
|
37
|
+
alias_method :access_token_expires_at, :accessTokenExpiresAt
|
38
|
+
alias_method :access_token_expires_at=, :accessTokenExpiresAt=
|
39
|
+
|
40
|
+
# Extra properties associated with the access token. (Property array)
|
41
|
+
attr_accessor :properties
|
42
|
+
|
43
|
+
# The scopes which is associated with the access token. (String array)
|
44
|
+
attr_accessor :scopes
|
45
|
+
|
46
|
+
# The constructor which takes a hash that represents a JSON response
|
47
|
+
# from /api/auth/token/update API.
|
48
|
+
def initialize(hash = {})
|
49
|
+
super(hash)
|
50
|
+
|
51
|
+
@action = extract_value(hash, :action)
|
52
|
+
@accessToken = extract_value(hash, :accessToken)
|
53
|
+
@accessTokenExpiresAt = extract_integer_value(hash, :accessTokenExpiresAt)
|
54
|
+
@properties = extract_array_value(hash, :scopes) do |element|
|
55
|
+
Authlete::Model::Property.parse(element)
|
56
|
+
end
|
57
|
+
@scopes = extract_value(hash, :scopes)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,47 @@
|
|
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::UserInfoIssueResponse class
|
22
|
+
#
|
23
|
+
# A class that represents a response from Authlete's
|
24
|
+
# /api/auth/userinfo/issue API.
|
25
|
+
class UserInfoIssueResponse < Authlete::Model::Result
|
26
|
+
# The next action which the caller of the API should take next.
|
27
|
+
# (String)
|
28
|
+
attr_accessor :action
|
29
|
+
|
30
|
+
# The content of the error response that the service implementation
|
31
|
+
# should return to the client application. (String)
|
32
|
+
attr_accessor :response_content
|
33
|
+
alias_method :response_content, :responseContent
|
34
|
+
alias_method :response_content=, :responseContent=
|
35
|
+
|
36
|
+
# The constructor which takes a hash that represents a JSON response
|
37
|
+
# from /api/auth/userinfo/issue API.
|
38
|
+
def initialize(hash = {})
|
39
|
+
super(hash)
|
40
|
+
|
41
|
+
@action = extract_value(hash, :action)
|
42
|
+
@responseContent = extract_value(hash, :responseContent)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,85 @@
|
|
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::UserInfoResponse class
|
22
|
+
#
|
23
|
+
# A class that represents a response from Authlete's
|
24
|
+
# /api/auth/userinfo API.
|
25
|
+
class UserInfoResponse < Authlete::Model::Result
|
26
|
+
# The next action which the caller of the API should take next.
|
27
|
+
# (String)
|
28
|
+
attr_accessor :action
|
29
|
+
|
30
|
+
# The list of claims that the client application requests to be
|
31
|
+
# embedded in the ID token. (String array)
|
32
|
+
attr_accessor :claims
|
33
|
+
|
34
|
+
# The ID of the client application which is associated with
|
35
|
+
# the access token. (Integer)
|
36
|
+
attr_accessor :clientId
|
37
|
+
alias_method :client_id, :clientId
|
38
|
+
alias_method :client_id=, :clientId=
|
39
|
+
|
40
|
+
# The client ID alias when the authorization request for the access
|
41
|
+
# token was made. (String)
|
42
|
+
attr_accessor :clientIdAlias
|
43
|
+
alias_method :client_id_alias, :clientIdAlias
|
44
|
+
alias_method :client_id_alias=, :clientIdAlias=
|
45
|
+
|
46
|
+
# The flag which indicates whether the client ID alias was used when
|
47
|
+
# the authorization request or the token request for the access token
|
48
|
+
# was made. (Boolean)
|
49
|
+
attr_accessor :clientIdAliasUsed
|
50
|
+
alias_method :client_id_alias_used, :clientIdAliasUsed
|
51
|
+
alias_method :client_id_alias_used=, :clientIdAliasUsed=
|
52
|
+
|
53
|
+
# The content of the error response that the service implementation
|
54
|
+
# should return to the client application. (String)
|
55
|
+
attr_accessor :response_content
|
56
|
+
alias_method :response_content, :responseContent
|
57
|
+
alias_method :response_content=, :responseContent=
|
58
|
+
|
59
|
+
# The scopes covered by the access token. (String array)
|
60
|
+
attr_accessor :scopes
|
61
|
+
|
62
|
+
# The subject (= resource owner's ID). (String)
|
63
|
+
attr_accessor :subject
|
64
|
+
|
65
|
+
# The access token that came along with the userinfo request. (String)
|
66
|
+
attr_accessor :token
|
67
|
+
|
68
|
+
# The constructor which takes a hash that represents a JSON response
|
69
|
+
# from /api/auth/introspection API.
|
70
|
+
def initialize(hash = {})
|
71
|
+
super(hash)
|
72
|
+
|
73
|
+
@action = extract_value(hash, :action)
|
74
|
+
@clientId = extract_value(hash, :clientId)
|
75
|
+
@clientIdAlias = extract_value(hash, :clientIdAlias)
|
76
|
+
@clientIdAliasUsed = extract_boolean_value(hash, :clientIdAliasUsed)
|
77
|
+
@responseContent = extract_value(hash, :responseContent)
|
78
|
+
@scopes = extract_value(hash, :scopes)
|
79
|
+
@subject = extract_value(hash, :subject)
|
80
|
+
@token = extract_value(hash, :token)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -1,45 +1,45 @@
|
|
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
|
-
# == Authlete::Model::Result
|
21
|
-
#
|
22
|
-
# The base class of responses from Authlete Web APIs.
|
23
|
-
class Result
|
24
|
-
include Authlete::Utility
|
25
|
-
# The code assigned to the result of the API call.
|
26
|
-
# (String)
|
27
|
-
attr_accessor :resultCode
|
28
|
-
alias_method :result_code, :resultCode
|
29
|
-
alias_method :result_code=, :resultCode=
|
30
|
-
|
31
|
-
# The message about the result of the API call.
|
32
|
-
# (String)
|
33
|
-
attr_accessor :resultMessage
|
34
|
-
alias_method :result_message, :resultMessage
|
35
|
-
alias_method :result_message=, :resultMessage=
|
36
|
-
|
37
|
-
private
|
38
|
-
|
39
|
-
def initialize(hash = {})
|
40
|
-
@resultCode = extract_value(hash, :resultCode)
|
41
|
-
@resultMessage = extract_value(hash, :resultMessage)
|
42
|
-
end
|
43
|
-
end
|
44
|
-
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
|
+
# == Authlete::Model::Result
|
21
|
+
#
|
22
|
+
# The base class of responses from Authlete Web APIs.
|
23
|
+
class Result
|
24
|
+
include Authlete::Utility
|
25
|
+
# The code assigned to the result of the API call.
|
26
|
+
# (String)
|
27
|
+
attr_accessor :resultCode
|
28
|
+
alias_method :result_code, :resultCode
|
29
|
+
alias_method :result_code=, :resultCode=
|
30
|
+
|
31
|
+
# The message about the result of the API call.
|
32
|
+
# (String)
|
33
|
+
attr_accessor :resultMessage
|
34
|
+
alias_method :result_message, :resultMessage
|
35
|
+
alias_method :result_message=, :resultMessage=
|
36
|
+
|
37
|
+
private
|
38
|
+
|
39
|
+
def initialize(hash = {})
|
40
|
+
@resultCode = extract_value(hash, :resultCode)
|
41
|
+
@resultMessage = extract_value(hash, :resultMessage)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
45
|
end
|