Class: Warden::Bootic::Oauth::User

Inherits:
Object
  • Object
show all
Defined in:
lib/warden-bootic/user.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attribs, token) ⇒ User

Returns a new instance of User.



8
9
10
# File 'lib/warden-bootic/user.rb', line 8

def initialize(attribs, token)
  @attribs, @token = attribs, token
end

Instance Attribute Details

#attribsObject (readonly)

Returns the value of attribute attribs.



6
7
8
# File 'lib/warden-bootic/user.rb', line 6

def attribs
  @attribs
end

#tokenObject (readonly)

Returns the value of attribute token.



6
7
8
# File 'lib/warden-bootic/user.rb', line 6

def token
  @token
end

Instance Method Details

#emailObject



16
17
18
# File 'lib/warden-bootic/user.rb', line 16

def email
  attribs['user_info']['email']
end

#roleObject



20
21
22
# File 'lib/warden-bootic/user.rb', line 20

def role
  attribs['user_info']['role_key']
end

#user_nameObject



12
13
14
# File 'lib/warden-bootic/user.rb', line 12

def user_name
  attribs['user_info']['user_name']
end