Class: Cassette::Authentication::User

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/cassette/authentication/user.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ User

Returns a new instance of User.



15
16
17
18
19
20
21
22
23
24
# File 'lib/cassette/authentication/user.rb', line 15

def initialize(attrs = {})
  config       = attrs[:config]
  @login       = attrs[:login]
  @name        = attrs[:name]
  @type        = attrs[:type]
  @email       = attrs[:email]
  @ticket      = attrs[:ticket]
  @authorities = Cassette::Authentication::Authorities
                 .parse(attrs.fetch(:authorities, '[]'), config && config.base_authority)
end

Instance Attribute Details

#authoritiesObject

Returns the value of attribute authorities.



12
13
14
# File 'lib/cassette/authentication/user.rb', line 12

def authorities
  @authorities
end

#emailObject

Returns the value of attribute email.



12
13
14
# File 'lib/cassette/authentication/user.rb', line 12

def email
  @email
end

#loginObject

Returns the value of attribute login.



12
13
14
# File 'lib/cassette/authentication/user.rb', line 12

def 
  @login
end

#nameObject

Returns the value of attribute name.



12
13
14
# File 'lib/cassette/authentication/user.rb', line 12

def name
  @name
end

#ticketObject

Returns the value of attribute ticket.



12
13
14
# File 'lib/cassette/authentication/user.rb', line 12

def ticket
  @ticket
end

#typeObject

Returns the value of attribute type.



12
13
14
# File 'lib/cassette/authentication/user.rb', line 12

def type
  @type
end