Class: Rack::OAuth2::Server::Authorize::Response
Instance Method Summary
collapse
Constructor Details
#initialize(request) ⇒ Response
Returns a new instance of Response.
83
84
85
86
|
# File 'lib/rack/oauth2/server/authorize.rb', line 83
def initialize(request)
@state = request.state
super
end
|
Instance Method Details
#approve! ⇒ Object
92
93
94
|
# File 'lib/rack/oauth2/server/authorize.rb', line 92
def approve!
@approval = true
end
|
#approved? ⇒ Boolean
88
89
90
|
# File 'lib/rack/oauth2/server/authorize.rb', line 88
def approved?
@approval
end
|
#finish ⇒ Object
104
105
106
107
108
109
110
|
# File 'lib/rack/oauth2/server/authorize.rb', line 104
def finish
if approved?
attr_missing!
redirect redirect_uri_with_credentials
end
super
end
|
#protocol_params ⇒ Object
96
97
98
|
# File 'lib/rack/oauth2/server/authorize.rb', line 96
def protocol_params
{state: state, session_state: session_state}
end
|
#redirect_uri_with_credentials ⇒ Object
100
101
102
|
# File 'lib/rack/oauth2/server/authorize.rb', line 100
def redirect_uri_with_credentials
Util.redirect_uri(redirect_uri, protocol_params_location, protocol_params)
end
|