Class: OktaUser

Inherits:
Object
  • Object
show all
Defined in:
app/models/okta_user.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ OktaUser

Returns a new instance of OktaUser.



4
5
6
# File 'app/models/okta_user.rb', line 4

def initialize(params)
  populate(params)
end

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes.



2
3
4
# File 'app/models/okta_user.rb', line 2

def attributes
  @attributes
end

#emailObject

Returns the value of attribute email.



2
3
4
# File 'app/models/okta_user.rb', line 2

def email
  @email
end

#issuerObject

Returns the value of attribute issuer.



2
3
4
# File 'app/models/okta_user.rb', line 2

def issuer
  @issuer
end

Class Method Details



16
17
18
# File 'app/models/okta_user.rb', line 16

def self.retrieve_from_cookie(cookie_hsh)
  self.new(cookie_hsh) unless cookie_hsh.blank?
end

Instance Method Details

#populate(params) ⇒ Object



8
9
10
11
12
13
14
# File 'app/models/okta_user.rb', line 8

def populate(params)
  params.each do |k, v|
    self.send("#{k}=".to_sym, v)
  end
rescue NoMethodError => error
  p error
end