Class: Api::OpenidConnect::AuthorizationPoint::EndpointConfirmationPoint

Inherits:
Endpoint
  • Object
show all
Defined in:
lib/api/openid_connect/authorization_point/endpoint_confirmation_point.rb

Instance Attribute Summary

Attributes inherited from Endpoint

#app, #nonce, #o_auth_application, #redirect_uri, #request_object, #request_uri, #response_type, #scopes, #user

Instance Method Summary collapse

Methods inherited from Endpoint

#build_attributes

Constructor Details

#initialize(current_user, approved = false) ⇒ EndpointConfirmationPoint

Returns a new instance of EndpointConfirmationPoint.


7
8
9
10
# File 'lib/api/openid_connect/authorization_point/endpoint_confirmation_point.rb', line 7

def initialize(current_user, approved=false)
  super(current_user)
  @approved = approved
end

Instance Method Details

#build_from_request_object(_req) ⇒ Object


24
25
26
# File 'lib/api/openid_connect/authorization_point/endpoint_confirmation_point.rb', line 24

def build_from_request_object(_req)
  # Empty
end

#handle_approval(approved, req, res) ⇒ Object


16
17
18
19
20
21
22
# File 'lib/api/openid_connect/authorization_point/endpoint_confirmation_point.rb', line 16

def handle_approval(approved, req, res)
  if approved
    approved!(req, res)
  else
    req.access_denied!
  end
end

#handle_response_type(req, res) ⇒ Object


12
13
14
# File 'lib/api/openid_connect/authorization_point/endpoint_confirmation_point.rb', line 12

def handle_response_type(req, res)
  handle_approval(@approved, req, res)
end