Class: OmniAuth::Strategies::Proconnect

Inherits:
Object
  • Object
show all
Includes:
OmniAuth::Strategy
Defined in:
lib/omniauth/proconnect.rb

Defined Under Namespace

Classes: Error

Instance Method Summary collapse

Instance Method Details

#callback_phaseObject



28
29
30
31
32
33
34
35
36
# File 'lib/omniauth/proconnect.rb', line 28

def callback_phase
  verify_state!(request.params["state"])

  exchange_authorization_code!(request.params["code"])
    .then { |response| store_tokens!(response) }
    .then { get_userinfo! }
    .then { |response| @userinfo = JSON::JWT.decode(response.body, :skip_verification) }
    .then { super }
end

#other_phaseObject



38
39
40
41
42
43
44
# File 'lib/omniauth/proconnect.rb', line 38

def other_phase
  if on_logout_path?
    engage_logout!
  else
    call_app!
  end
end

#request_phaseObject



24
25
26
# File 'lib/omniauth/proconnect.rb', line 24

def request_phase
  redirect(authorization_uri)
end