Class: OmniAuth::Strategies::Cloudiap

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

Defined Under Namespace

Classes: HTTPHeaderError

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#userinfoObject

Returns the value of attribute userinfo.



19
20
21
# File 'lib/omniauth/strategies/cloudiap.rb', line 19

def userinfo
  @userinfo
end

Instance Method Details

#callback_phaseObject



25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/omniauth/strategies/cloudiap.rb', line 25

def callback_phase
  if jwt_verify?
    begin
      self.userinfo = userinfo_from_jwt
    rescue => e
      return fail!(:invalid_credentials, e)
    end
  else
    self.userinfo = userinfo_from_http_header
  end

  super
end

#infoObject



43
44
45
# File 'lib/omniauth/strategies/cloudiap.rb', line 43

def info
  userinfo
end

#request_phaseObject



21
22
23
# File 'lib/omniauth/strategies/cloudiap.rb', line 21

def request_phase
  redirect callback_path
end

#uidObject



39
40
41
# File 'lib/omniauth/strategies/cloudiap.rb', line 39

def uid
  userinfo[:uid] if userinfo
end