Class: OmniAuth::Strategies::SSO

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

Constant Summary collapse

SSO_URL =
'neststaging.riseup.net/sso_auth'

Instance Method Summary collapse

Instance Method Details

#authorize_url(_params_from_options) ⇒ Object



28
29
30
# File 'lib/omniauth/strategies/sso.rb', line 28

def authorize_url(_params_from_options)
  "https://#{SSO_URL}/?s=#{service_param}"
end

#clientObject



44
45
46
# File 'lib/omniauth/strategies/sso.rb', line 44

def client
  RbSSO::Client.new options.service_id, options.client_key
end

#info_from_ticketObject



40
41
42
# File 'lib/omniauth/strategies/sso.rb', line 40

def info_from_ticket
  @info_from_ticket ||= client.open request["t"]
end

#nameObject



36
37
38
# File 'lib/omniauth/strategies/sso.rb', line 36

def name
  'sso'
end

#request_phaseObject



16
17
18
# File 'lib/omniauth/strategies/sso.rb', line 16

def request_phase
  redirect authorize_url(options.authorize_params)
end

#service_paramObject



32
33
34
# File 'lib/omniauth/strategies/sso.rb', line 32

def service_param
  CGI.escape options.service_id
end