Class: Cassette::Authentication::User

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ User


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

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


10
11
12
# File 'lib/cassette/authentication/user.rb', line 10

def authorities
  @authorities
end

#emailObject

Returns the value of attribute email


10
11
12
# File 'lib/cassette/authentication/user.rb', line 10

def email
  @email
end

#loginObject

Returns the value of attribute login


10
11
12
# File 'lib/cassette/authentication/user.rb', line 10

def 
  @login
end

#nameObject

Returns the value of attribute name


10
11
12
# File 'lib/cassette/authentication/user.rb', line 10

def name
  @name
end

#ticketObject

Returns the value of attribute ticket


10
11
12
# File 'lib/cassette/authentication/user.rb', line 10

def ticket
  @ticket
end

#typeObject

Returns the value of attribute type


10
11
12
# File 'lib/cassette/authentication/user.rb', line 10

def type
  @type
end