authlete 1.0.24 → 1.1.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/.gitignore +2 -1
- data/Makefile +40 -0
- data/Rakefile +5 -0
- data/authlete.gemspec +2 -2
- data/lib/authlete.rb +28 -9
- data/lib/authlete/api.rb +146 -321
- data/lib/authlete/authentication-server.rb +2 -2
- data/lib/authlete/exception.rb +14 -15
- data/lib/authlete/model/base.rb +30 -0
- data/lib/authlete/model/client-extension.rb +17 -119
- data/lib/authlete/model/client.rb +196 -345
- data/lib/authlete/model/hashable.rb +13 -33
- data/lib/authlete/model/named-uri.rb +13 -74
- data/lib/authlete/model/pair.rb +13 -74
- data/lib/authlete/model/param-initializer.rb +45 -0
- data/lib/authlete/model/property.rb +15 -85
- data/lib/authlete/model/request/authentication-callback-request.rb +63 -55
- data/lib/authlete/model/request/authorization-fail-request.rb +14 -75
- data/lib/authlete/model/request/authorization-issue-request.rb +38 -119
- data/lib/authlete/model/request/authorization-request.rb +8 -73
- data/lib/authlete/model/request/backchannel-authentication-complete-request.rb +97 -0
- data/lib/authlete/model/request/backchannel-authentication-fail-request.rb +55 -0
- data/lib/authlete/model/request/backchannel-authentication-issue-request.rb +37 -0
- data/lib/authlete/model/request/backchannel-authentication-request.rb +63 -0
- data/lib/authlete/model/request/base.rb +26 -0
- data/lib/authlete/model/request/client-authorization-delete-request.rb +7 -93
- data/lib/authlete/model/request/client-authorization-get-list-request.rb +17 -89
- data/lib/authlete/model/request/client-authorization-update-request.rb +11 -86
- data/lib/authlete/model/request/client-registration-request.rb +49 -0
- data/lib/authlete/model/request/client-secret-update-request.rb +7 -89
- data/lib/authlete/model/request/developer-authentication-callback-request.rb +40 -43
- data/lib/authlete/model/request/device-authorization-request.rb +63 -0
- data/lib/authlete/model/request/device-complete-request.rb +99 -0
- data/lib/authlete/model/request/device-verification-request.rb +40 -0
- data/lib/authlete/model/request/granted-scopes-request.rb +8 -74
- data/lib/authlete/model/request/introspection-request.rb +24 -83
- data/lib/authlete/model/request/pushed-auth-req-request.rb +64 -0
- data/lib/authlete/model/request/revocation-request.rb +14 -88
- data/lib/authlete/model/request/standard-introspection-request.rb +8 -73
- data/lib/authlete/model/request/token-create-request.rb +52 -183
- data/lib/authlete/model/request/token-fail-request.rb +12 -74
- data/lib/authlete/model/request/token-issue-request.rb +22 -80
- data/lib/authlete/model/request/token-request.rb +44 -81
- data/lib/authlete/model/request/token-update-request.rb +35 -121
- data/lib/authlete/model/request/user-info-issue-request.rb +14 -80
- data/lib/authlete/model/request/user-info-request.rb +25 -70
- data/lib/authlete/model/response/access-token.rb +96 -0
- data/lib/authlete/model/response/authentication-callback-response.rb +24 -19
- data/lib/authlete/model/response/authorization-fail-response.rb +13 -15
- data/lib/authlete/model/response/authorization-issue-response.rb +29 -32
- data/lib/authlete/model/response/authorization-response.rb +97 -123
- data/lib/authlete/model/response/authorized-client-list-response.rb +37 -0
- data/lib/authlete/model/response/backchannel-authentication-complete-response.rb +143 -0
- data/lib/authlete/model/response/backchannel-authentication-fail-response.rb +47 -0
- data/lib/authlete/model/response/backchannel-authentication-issue-response.rb +63 -0
- data/lib/authlete/model/response/backchannel-authentication-response.rb +160 -0
- data/lib/authlete/model/response/client-list-response.rb +58 -0
- data/lib/authlete/model/response/client-registration-response.rb +50 -0
- data/lib/authlete/model/response/client-secret-refresh-response.rb +12 -12
- data/lib/authlete/model/response/client-secret-update-response.rb +12 -12
- data/lib/authlete/model/response/developer-authentication-callback-response.rb +24 -19
- data/lib/authlete/model/response/device-authorization-response.rb +134 -0
- data/lib/authlete/model/response/device-complete-response.rb +39 -0
- data/lib/authlete/model/response/device-verification-response.rb +96 -0
- data/lib/authlete/model/response/granted-scopes-get-response.rb +27 -19
- data/lib/authlete/model/response/introspection-response.rb +64 -58
- data/lib/authlete/model/response/pushed-auth-req-response.rb +59 -0
- data/lib/authlete/model/response/revocation-response.rb +12 -15
- data/lib/authlete/model/response/service-list-response.rb +54 -0
- data/lib/authlete/model/response/standard-introspection-response.rb +13 -15
- data/lib/authlete/model/response/token-create-response.rb +50 -55
- data/lib/authlete/model/response/token-fail-response.rb +14 -17
- data/lib/authlete/model/response/token-issue-response.rb +49 -62
- data/lib/authlete/model/response/token-list-response.rb +64 -0
- data/lib/authlete/model/response/token-response.rb +59 -79
- data/lib/authlete/model/response/token-update-response.rb +28 -23
- data/lib/authlete/model/response/user-info-issue-response.rb +16 -16
- data/lib/authlete/model/response/user-info-response.rb +48 -42
- data/lib/authlete/model/result.rb +14 -13
- data/lib/authlete/model/scope.rb +29 -119
- data/lib/authlete/model/service-owner.rb +32 -116
- data/lib/authlete/model/service.rb +464 -685
- data/lib/authlete/model/sns-credentials.rb +18 -91
- data/lib/authlete/model/tagged-value.rb +14 -69
- data/lib/authlete/utility.rb +3 -32
- data/lib/authlete/version.rb +3 -3
- data/test/authlete/model/request/test_authentication-callback-request.rb +100 -0
- data/test/authlete/model/request/test_authorization-fail-request.rb +67 -0
- data/test/authlete/model/request/test_authorization-issue-request.rb +94 -0
- data/test/authlete/model/request/test_authorization-request.rb +57 -0
- data/test/authlete/model/request/test_backchannel-authentication-complete-request.rb +102 -0
- data/test/authlete/model/request/test_backchannel-authentication-fail-request.rb +71 -0
- data/test/authlete/model/request/test_backchannel-authentication-issue-request.rb +57 -0
- data/test/authlete/model/request/test_backchannel-authentication-request.rb +75 -0
- data/test/authlete/model/request/test_client-authorization-delete-request.rb +57 -0
- data/test/authlete/model/request/test_client-authorization-get-list-request.rb +71 -0
- data/test/authlete/model/request/test_client-authorization-update-request.rb +63 -0
- data/test/authlete/model/request/test_client-registration-request.rb +68 -0
- data/test/authlete/model/request/test_device-authorization-request.rb +75 -0
- data/test/authlete/model/request/test_device-complete-request.rb +102 -0
- data/test/authlete/model/request/test_device-verification-request.rb +57 -0
- data/test/authlete/model/request/test_granted-scopes-request.rb +57 -0
- data/test/authlete/model/request/test_introspection-request.rb +79 -0
- data/test/authlete/model/request/test_pushed-auth-req-request.rb +75 -0
- data/test/authlete/model/request/test_revocation-request.rb +67 -0
- data/test/authlete/model/request/test_standard-introspection-request.rb +57 -0
- data/test/authlete/model/request/test_token-create-request.rb +110 -0
- data/test/authlete/model/request/test_token-fail-request.rb +63 -0
- data/test/authlete/model/request/test_token-issue-request.rb +70 -0
- data/test/authlete/model/request/test_token-request.rb +94 -0
- data/test/authlete/model/request/test_token-update-request.rb +82 -0
- data/test/authlete/model/request/test_user-info-issue-request.rb +67 -0
- data/test/authlete/model/request/test_user-info-request.rb +75 -0
- data/test/authlete/model/response/test_access-token.rb +101 -0
- data/test/authlete/model/response/test_authorization-fail-response.rb +68 -0
- data/test/authlete/model/response/test_authorization-issue-response.rb +92 -0
- data/test/authlete/model/response/test_authorization-response.rb +145 -0
- data/test/authlete/model/response/test_authorized-client-list-response.rb +83 -0
- data/test/authlete/model/response/test_backchannel-authentication-complete-response.rb +132 -0
- data/test/authlete/model/response/test_backchannel-authentication-fail-response.rb +68 -0
- data/test/authlete/model/response/test_backchannel-authentication-issue-response.rb +80 -0
- data/test/authlete/model/response/test_backchannel-authentication-response.rb +156 -0
- data/test/authlete/model/response/test_client-list-response.rb +79 -0
- data/test/authlete/model/response/test_client-secret-refresh-response.rb +68 -0
- data/test/authlete/model/response/test_client-secret-update-response.rb +68 -0
- data/test/authlete/model/response/test_device-authorization-response.rb +140 -0
- data/test/authlete/model/response/test_device-complete-response.rb +64 -0
- data/test/authlete/model/response/test_device-verification-response.rb +112 -0
- data/test/authlete/model/response/test_granted-scopes-get-response.rb +84 -0
- data/test/authlete/model/response/test_introspection-response.rb +127 -0
- data/test/authlete/model/response/test_pushed-auth-req-response.rb +76 -0
- data/test/authlete/model/response/test_revocation-response.rb +68 -0
- data/test/authlete/model/response/test_service-list-response.rb +72 -0
- data/test/authlete/model/response/test_standard-introspection-response.rb +68 -0
- data/test/authlete/model/response/test_token-create-response.rb +107 -0
- data/test/authlete/model/response/test_token-fail-response.rb +68 -0
- data/test/authlete/model/response/test_token-issue-response.rb +127 -0
- data/test/authlete/model/response/test_token-list-response.rb +84 -0
- data/test/authlete/model/response/test_token-response.rb +147 -0
- data/test/authlete/model/response/test_token-update-response.rb +87 -0
- data/test/authlete/model/response/test_user-info-issue-response.rb +68 -0
- data/test/authlete/model/response/test_user-info-response.rb +107 -0
- data/test/authlete/model/test_client-extension.rb +95 -0
- data/test/authlete/model/test_client.rb +461 -0
- data/test/authlete/model/test_named-uri.rb +85 -0
- data/test/authlete/model/test_pair.rb +85 -0
- data/test/authlete/model/test_property.rb +90 -0
- data/test/authlete/model/test_result.rb +68 -0
- data/test/authlete/model/test_scope.rb +106 -0
- data/test/authlete/model/test_service-owner.rb +80 -0
- data/test/authlete/model/test_service.rb +614 -0
- data/test/authlete/model/test_sns-credentials.rb +88 -0
- data/test/authlete/model/test_tagged-value.rb +83 -0
- data/test/authlete/test_exception.rb +70 -0
- metadata +169 -9
- data/lib/authlete/model/client-list.rb +0 -129
- data/lib/authlete/model/response/client-authorization-get-list-response.rb +0 -60
- data/lib/authlete/model/response/service-creatable-response.rb +0 -51
- data/lib/authlete/model/service-list.rb +0 -128
@@ -1,6 +1,6 @@
|
|
1
1
|
# :nodoc:
|
2
2
|
#
|
3
|
-
# Copyright (C) 2014-
|
3
|
+
# Copyright (C) 2014-2020 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.
|
@@ -18,69 +18,66 @@
|
|
18
18
|
module Authlete
|
19
19
|
module Model
|
20
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
21
|
class AuthorizationIssueResponse < Authlete::Model::Result
|
25
|
-
|
26
|
-
# (String)
|
22
|
+
|
27
23
|
attr_accessor :action
|
28
24
|
|
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
25
|
attr_accessor :responseContent
|
33
26
|
alias_method :response_content, :responseContent
|
34
27
|
alias_method :response_content=, :responseContent=
|
35
28
|
|
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
29
|
attr_accessor :accessToken
|
40
30
|
alias_method :access_token, :accessToken
|
41
31
|
alias_method :access_token=, :accessToken=
|
42
32
|
|
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
33
|
attr_accessor :accessTokenExpiresAt
|
47
34
|
alias_method :access_token_expires_at, :accessTokenExpiresAt
|
48
35
|
alias_method :access_token_expires_at=, :accessTokenExpiresAt=
|
49
36
|
|
50
|
-
# The duration of the newly issued access token in seconds. (Integer)
|
51
37
|
attr_accessor :accessTokenDuration
|
52
38
|
alias_method :access_token_duration, :accessTokenDuration
|
53
39
|
alias_method :access_token_duration=, :accessTokenDuration=
|
54
40
|
|
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
41
|
attr_accessor :idToken
|
59
42
|
alias_method :id_token, :idToken
|
60
43
|
alias_method :id_token=, :idToken=
|
61
44
|
|
62
|
-
# The newly issued authorization code. Note that an authorization code
|
63
|
-
# is issued only when "response_type" contains "code". (String)
|
64
45
|
attr_accessor :authorizationCode
|
65
46
|
alias_method :authorization_code, :authorizationCode
|
66
47
|
alias_method :authorization_code=, :authorizationCode=
|
67
48
|
|
49
|
+
attr_accessor :jwtAccessToken
|
50
|
+
alias_method :jwt_access_token, :jwtAccessToken
|
51
|
+
alias_method :jwt_access_token=, :jwtAccessToken=
|
52
|
+
|
68
53
|
private
|
69
54
|
|
70
|
-
|
71
|
-
|
72
|
-
|
55
|
+
def defaults
|
56
|
+
super.merge(
|
57
|
+
action: nil,
|
58
|
+
responseContent: nil,
|
59
|
+
accessToken: nil,
|
60
|
+
accessTokenExpiresAt: 0,
|
61
|
+
accessTokenDuration: 0,
|
62
|
+
idToken: nil,
|
63
|
+
authorizationCode: nil,
|
64
|
+
jwtAccessToken: nil
|
65
|
+
)
|
66
|
+
end
|
67
|
+
|
68
|
+
def set_params(hash = {})
|
73
69
|
super(hash)
|
74
70
|
|
75
|
-
@action =
|
76
|
-
@responseContent =
|
77
|
-
@accessToken =
|
78
|
-
@accessTokenExpiresAt =
|
79
|
-
@accessTokenDuration =
|
80
|
-
@idToken =
|
81
|
-
@authorizationCode =
|
71
|
+
@action = hash[:action]
|
72
|
+
@responseContent = hash[:responseContent]
|
73
|
+
@accessToken = hash[:accessToken]
|
74
|
+
@accessTokenExpiresAt = hash[:accessTokenExpiresAt]
|
75
|
+
@accessTokenDuration = hash[:accessTokenDuration]
|
76
|
+
@idToken = hash[:idToken]
|
77
|
+
@authorizationCode = hash[:authorizationCode]
|
78
|
+
@jwtAccessToken = hash[:jwtAccessToken]
|
82
79
|
end
|
83
80
|
end
|
84
81
|
end
|
85
82
|
end
|
86
|
-
end
|
83
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# :nodoc:
|
2
2
|
#
|
3
|
-
# Copyright (C) 2014-
|
3
|
+
# Copyright (C) 2014-2020 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.
|
@@ -18,161 +18,135 @@
|
|
18
18
|
module Authlete
|
19
19
|
module Model
|
20
20
|
module Response
|
21
|
-
# == Authlete::Model::Response::AuthorizationResponse class
|
22
|
-
#
|
23
|
-
# This class represents a response from Authlete's /api/auth/authorization API.
|
24
21
|
class AuthorizationResponse < Authlete::Model::Result
|
25
|
-
|
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=
|
22
|
+
include Authlete::Utility
|
30
23
|
|
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
24
|
attr_accessor :action
|
42
25
|
|
43
|
-
|
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
|
26
|
+
attr_accessor :service
|
55
27
|
|
56
|
-
# The information about the client application which has made
|
57
|
-
# the authorization request. (Client)
|
58
28
|
attr_accessor :client
|
59
29
|
|
60
|
-
|
61
|
-
|
62
|
-
|
30
|
+
attr_accessor :display
|
31
|
+
|
32
|
+
attr_accessor :maxAge
|
33
|
+
alias_method :max_age, :maxAge
|
34
|
+
alias_method :max_age=, :maxAge=
|
35
|
+
|
36
|
+
attr_accessor :scopes
|
37
|
+
|
38
|
+
attr_accessor :uiLocales
|
39
|
+
alias_method :ui_locales, :uiLocales
|
40
|
+
alias_method :ui_locales=, :uiLocales=
|
41
|
+
|
42
|
+
attr_accessor :claimsLocales
|
43
|
+
alias_method :claims_locales, :claimsLocales
|
44
|
+
alias_method :claims_locales=, :claimsLocales=
|
45
|
+
|
46
|
+
attr_accessor :claims
|
47
|
+
|
48
|
+
attr_accessor :acrEssential
|
49
|
+
alias_method :acr_essential, :acrEssential
|
50
|
+
alias_method :acr_essential=, :acrEssential=
|
51
|
+
|
63
52
|
attr_accessor :clientIdAliasUsed
|
64
53
|
alias_method :client_id_alias_used, :clientIdAliasUsed
|
65
54
|
alias_method :client_id_alias_used=, :clientIdAliasUsed=
|
66
55
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
# this method returns "PAGE" as the default value.
|
71
|
-
# (String)
|
72
|
-
attr_accessor :display
|
56
|
+
attr_accessor :acrs
|
57
|
+
|
58
|
+
attr_accessor :subject
|
73
59
|
|
74
|
-
# The value of login hint, which is specified by the client
|
75
|
-
# application using "login_hint" request parameter.
|
76
|
-
# (String)
|
77
60
|
attr_accessor :loginHint
|
78
61
|
alias_method :login_hint, :loginHint
|
79
62
|
alias_method :login_hint=, :loginHint=
|
80
63
|
|
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
64
|
attr_accessor :lowestPrompt
|
87
65
|
alias_method :lowest_prompt, :lowestPrompt
|
88
66
|
alias_method :lowest_prompt=, :lowestPrompt=
|
89
67
|
|
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
68
|
attr_accessor :prompts
|
105
69
|
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
attr_accessor :responseContent
|
110
|
-
alias_method :response_content, :responseContent
|
111
|
-
alias_method :response_content=, :responseContent=
|
70
|
+
attr_accessor :requestObjectPayload
|
71
|
+
alias_method :request_object_payload, :requestObjectPayload
|
72
|
+
alias_method :request_object_payload=, :requestObjectPayload=
|
112
73
|
|
113
|
-
|
114
|
-
|
115
|
-
|
74
|
+
attr_accessor :idTokenClaims
|
75
|
+
alias_method :id_token_claims, :idTokenClaims
|
76
|
+
alias_method :id_token_claims=, :idTokenClaims=
|
116
77
|
|
117
|
-
|
118
|
-
|
119
|
-
|
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
|
78
|
+
attr_accessor :userInfoClaims
|
79
|
+
alias_method :user_info_claims, :userInfoClaims
|
80
|
+
alias_method :user_info_claims=, :userInfoClaims=
|
126
81
|
|
127
|
-
|
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
|
82
|
+
attr_accessor :resources
|
133
83
|
|
134
|
-
|
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
|
84
|
+
attr_accessor :purpose
|
139
85
|
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
alias_method :ui_locales=, :uiLocales=
|
86
|
+
attr_accessor :responseContent
|
87
|
+
alias_method :response_content, :responseContent
|
88
|
+
alias_method :response_content=, :responseContent=
|
89
|
+
|
90
|
+
attr_accessor :ticket
|
146
91
|
|
147
92
|
private
|
148
93
|
|
149
|
-
|
150
|
-
|
151
|
-
|
94
|
+
def defaults
|
95
|
+
super.merge(
|
96
|
+
action: nil,
|
97
|
+
service: nil,
|
98
|
+
client: nil,
|
99
|
+
display: nil,
|
100
|
+
maxAge: 0,
|
101
|
+
scopes: nil,
|
102
|
+
uiLocales: nil,
|
103
|
+
claimsLocales: nil,
|
104
|
+
claims: nil,
|
105
|
+
acrEssential: false,
|
106
|
+
clientIdAliasUsed: false,
|
107
|
+
acrs: nil,
|
108
|
+
subject: nil,
|
109
|
+
loginHint: nil,
|
110
|
+
lowestPrompt: nil,
|
111
|
+
prompts: nil,
|
112
|
+
requestObjectPayload: nil,
|
113
|
+
idTokenClaims: nil,
|
114
|
+
userInfoClaims: nil,
|
115
|
+
resources: nil,
|
116
|
+
purpose: nil,
|
117
|
+
responseContent: nil,
|
118
|
+
ticket: nil
|
119
|
+
)
|
120
|
+
end
|
121
|
+
|
122
|
+
def set_params(hash)
|
152
123
|
super(hash)
|
153
124
|
|
154
|
-
@
|
155
|
-
@
|
156
|
-
@
|
157
|
-
@
|
158
|
-
@
|
159
|
-
@
|
160
|
-
@
|
161
|
-
@
|
162
|
-
@
|
163
|
-
@
|
164
|
-
@
|
165
|
-
@
|
166
|
-
@
|
167
|
-
@
|
168
|
-
@
|
169
|
-
|
170
|
-
|
171
|
-
@
|
172
|
-
@
|
173
|
-
@
|
125
|
+
@action = hash[:action]
|
126
|
+
@service = Authlete::Model::Service.new(hash[:service])
|
127
|
+
@client = Authlete::Model::Client.new(hash[:client])
|
128
|
+
@display = hash[:display]
|
129
|
+
@maxAge = hash[:maxAge]
|
130
|
+
@scopes = get_parsed_array(hash[:scopes]) { |e| Authlete::Model::Scope.parse(e) }
|
131
|
+
@uiLocales = hash[:uiLocales]
|
132
|
+
@claimsLocales = hash[:claimsLocales]
|
133
|
+
@claims = hash[:claims]
|
134
|
+
@acrEssential = hash[:acrEssential]
|
135
|
+
@clientIdAliasUsed = hash[:clientIdAliasUsed]
|
136
|
+
@acrs = hash[:acrs]
|
137
|
+
@subject = hash[:subject]
|
138
|
+
@loginHint = hash[:loginHint]
|
139
|
+
@lowestPrompt = hash[:lowestPrompt]
|
140
|
+
@prompts = hash[:prompts]
|
141
|
+
@requestObjectPayload = hash[:requestObjectPayload]
|
142
|
+
@idTokenClaims = hash[:idTokenClaims]
|
143
|
+
@userInfoClaims = hash[:userInfoClaims]
|
144
|
+
@resources = hash[:resources]
|
145
|
+
@purpose = hash[:purpose]
|
146
|
+
@responseContent = hash[:responseContent]
|
147
|
+
@ticket = hash[:ticket]
|
174
148
|
end
|
175
149
|
end
|
176
150
|
end
|
177
151
|
end
|
178
|
-
end
|
152
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# :nodoc:
|
2
|
+
#
|
3
|
+
# Copyright (C) 2014-2020 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
|
+
class AuthorizedClientListResponse < Authlete::Model::Response::ClientListResponse
|
22
|
+
|
23
|
+
attr_accessor :subject
|
24
|
+
|
25
|
+
def defaults
|
26
|
+
super.merge(subject: nil)
|
27
|
+
end
|
28
|
+
|
29
|
+
def set_params(hash)
|
30
|
+
super(hash)
|
31
|
+
|
32
|
+
@subject = hash[:subject]
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,143 @@
|
|
1
|
+
# :nodoc:
|
2
|
+
#
|
3
|
+
# Copyright (C) 2014-2020 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
|
+
class BackchannelAuthenticationCompleteResponse < Authlete::Model::Result
|
22
|
+
|
23
|
+
attr_accessor :action
|
24
|
+
|
25
|
+
attr_accessor :responseContent
|
26
|
+
alias_method :response_content, :responseContent
|
27
|
+
alias_method :response_content=, :responseContent=
|
28
|
+
|
29
|
+
attr_accessor :clientId
|
30
|
+
alias_method :client_id, :clientId
|
31
|
+
alias_method :client_id=, :clientId=
|
32
|
+
|
33
|
+
attr_accessor :clientIdAlias
|
34
|
+
alias_method :client_id_alias, :clientIdAlias
|
35
|
+
alias_method :client_id_alias=, :clientIdAlias=
|
36
|
+
|
37
|
+
attr_accessor :clientIdAliasUsed
|
38
|
+
alias_method :client_id_alias_used, :clientIdAliasUsed
|
39
|
+
alias_method :client_id_alias_used=, :clientIdAliasUsed=
|
40
|
+
|
41
|
+
attr_accessor :clientName
|
42
|
+
alias_method :client_name, :clientName
|
43
|
+
alias_method :client_name=, :clientName=
|
44
|
+
|
45
|
+
attr_accessor :deliveryMethod
|
46
|
+
alias_method :delivery_method, :deliveryMethod
|
47
|
+
alias_method :delivery_method=, :deliveryMethod=
|
48
|
+
|
49
|
+
attr_accessor :clientNotificationEndpoint
|
50
|
+
alias_method :client_notification_endpoint, :clientNotificationEndpoint
|
51
|
+
alias_method :client_notification_endpoint=, :clientNotificationEndpoint=
|
52
|
+
|
53
|
+
attr_accessor :clientNotificationToken
|
54
|
+
alias_method :client_notification_token, :clientNotificationToken
|
55
|
+
alias_method :client_notification_token=, :clientNotificationToken=
|
56
|
+
|
57
|
+
attr_accessor :authReqId
|
58
|
+
alias_method :auth_req_id, :authReqId
|
59
|
+
alias_method :auth_req_id=, :authReqId=
|
60
|
+
|
61
|
+
attr_accessor :accessToken
|
62
|
+
alias_method :access_token, :accessToken
|
63
|
+
alias_method :access_token=, :accessToken=
|
64
|
+
|
65
|
+
attr_accessor :refreshToken
|
66
|
+
alias_method :refresh_token, :refreshToken
|
67
|
+
alias_method :refresh_token=, :refreshToken=
|
68
|
+
|
69
|
+
attr_accessor :idToken
|
70
|
+
alias_method :id_token, :idToken
|
71
|
+
alias_method :id_token=, :idToken=
|
72
|
+
|
73
|
+
attr_accessor :accessTokenDuration
|
74
|
+
alias_method :access_token_duration, :accessTokenDuration
|
75
|
+
alias_method :access_token_duration=, :accessTokenDuration=
|
76
|
+
|
77
|
+
attr_accessor :refreshTokenDuration
|
78
|
+
alias_method :refresh_token_duration, :refreshTokenDuration
|
79
|
+
alias_method :refresh_token_duration=, :refreshTokenDuration=
|
80
|
+
|
81
|
+
attr_accessor :idTokenDuration
|
82
|
+
alias_method :id_token_duration, :idTokenDuration
|
83
|
+
alias_method :id_token_duration=, :idTokenDuration=
|
84
|
+
|
85
|
+
attr_accessor :jwtAccessToken
|
86
|
+
alias_method :jwt_access_token, :jwtAccessToken
|
87
|
+
alias_method :jwt_access_token=, :jwtAccessToken=
|
88
|
+
|
89
|
+
attr_accessor :resources
|
90
|
+
|
91
|
+
private
|
92
|
+
|
93
|
+
def defaults
|
94
|
+
super.merge(
|
95
|
+
action: nil,
|
96
|
+
responseContent: nil,
|
97
|
+
clientId: 0,
|
98
|
+
clientIdAlias: nil,
|
99
|
+
clientIdAliasUsed: false,
|
100
|
+
clientName: nil,
|
101
|
+
clientAuthMethod: nil,
|
102
|
+
deliveryMethod: nil,
|
103
|
+
clientNotificationToken: nil,
|
104
|
+
clientNotificationEndpoint: nil,
|
105
|
+
authReqId: nil,
|
106
|
+
accessToken: nil,
|
107
|
+
refreshToken: nil,
|
108
|
+
idToken: nil,
|
109
|
+
accessTokenDuration: 0,
|
110
|
+
refreshTokenDuration: 0,
|
111
|
+
idTokenDuration: 0,
|
112
|
+
jwtAccessToken: nil,
|
113
|
+
resources: nil
|
114
|
+
)
|
115
|
+
end
|
116
|
+
|
117
|
+
def set_params(hash)
|
118
|
+
super(hash)
|
119
|
+
|
120
|
+
@action = hash[:action]
|
121
|
+
@responseContent = hash[:responseContent]
|
122
|
+
@clientId = hash[:clientId]
|
123
|
+
@clientIdAlias = hash[:clientIdAlias]
|
124
|
+
@clientIdAliasUsed = hash[:clientIdAliasUsed]
|
125
|
+
@clientName = hash[:clientName]
|
126
|
+
@clientAuthMethod = hash[:clientAuthMethod]
|
127
|
+
@deliveryMethod = hash[:deliveryMethod]
|
128
|
+
@clientNotificationToken = hash[:clientNotificationToken]
|
129
|
+
@clientNotificationEndpoint = hash[:clientNotificationEndpoint]
|
130
|
+
@authReqId = hash[:authReqId]
|
131
|
+
@accessToken = hash[:accessToken]
|
132
|
+
@refreshToken = hash[:refreshToken]
|
133
|
+
@idToken = hash[:idToken]
|
134
|
+
@accessTokenDuration = hash[:accessTokenDuration]
|
135
|
+
@refreshTokenDuration = hash[:refreshTokenDuration]
|
136
|
+
@idTokenDuration = hash[:idTokenDuration]
|
137
|
+
@jwtAccessToken = hash[:jwtAccessToken]
|
138
|
+
@resources = hash[:resources]
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|