Class: JunglePath::Authentication::Identity

Inherits:
Object
  • Object
show all
Defined in:
lib/jungle_path/authentication/identity.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#authorization_filterObject

Returns the value of attribute authorization_filter.



4
5
6
# File 'lib/jungle_path/authentication/identity.rb', line 4

def authorization_filter
  @authorization_filter
end

#keyObject

Returns the value of attribute key.



4
5
6
# File 'lib/jungle_path/authentication/identity.rb', line 4

def key
  @key
end

#query_filtersObject

Returns the value of attribute query_filters.



4
5
6
# File 'lib/jungle_path/authentication/identity.rb', line 4

def query_filters
  @query_filters
end

#remote_passwordObject

Returns the value of attribute remote_password.



4
5
6
# File 'lib/jungle_path/authentication/identity.rb', line 4

def remote_password
  @remote_password
end

#remote_userObject

Returns the value of attribute remote_user.



4
5
6
# File 'lib/jungle_path/authentication/identity.rb', line 4

def remote_user
  @remote_user
end

#roleObject

Returns the value of attribute role.



4
5
6
# File 'lib/jungle_path/authentication/identity.rb', line 4

def role
  @role
end

#table_filtersObject

Returns the value of attribute table_filters.



4
5
6
# File 'lib/jungle_path/authentication/identity.rb', line 4

def table_filters
  @table_filters
end

#userObject

Returns the value of attribute user.



4
5
6
# File 'lib/jungle_path/authentication/identity.rb', line 4

def user
  @user
end

#user_nameObject

Returns the value of attribute user_name.



4
5
6
# File 'lib/jungle_path/authentication/identity.rb', line 4

def user_name
  @user_name
end

#validObject

Returns the value of attribute valid.



4
5
6
# File 'lib/jungle_path/authentication/identity.rb', line 4

def valid
  @valid
end

Instance Method Details

#alternative_user_keysObject



23
24
25
26
27
# File 'lib/jungle_path/authentication/identity.rb', line 23

def alternative_user_keys
  return @alternative_user_keys if @alternative_user_keys
  @alternative_user_keys = {user_id: @user.id} if @user
  @alternative_user_keys
end

#alternative_user_keys=(value) ⇒ Object



28
29
30
# File 'lib/jungle_path/authentication/identity.rb', line 28

def alternative_user_keys= value
  @alternative_user_keys = value
end

#to_hObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/jungle_path/authentication/identity.rb', line 8

def to_h
  {
    remote_user: @remote_user,
    remote_password: @remote_password,
    user_name: @user_name,
    user: @user,
    key: @key,
    valid: @valid,
    role: @role,
    authorization_filter: @authorization_filter,
    query_filters: @query_filters,
    table_filters: @table_filters,
    alternative_user_keys: @alternative_user_keys
  }
end

#to_hashObject



31
32
33
# File 'lib/jungle_path/authentication/identity.rb', line 31

def to_hash
  to_h
end

#to_sObject



5
6
7
# File 'lib/jungle_path/authentication/identity.rb', line 5

def to_s
	"JunglePath::Authentication::Identity: {\n  remote_user: #{@remote_user},\n  remote_password: #{@remote_password},\n  user_name: #{@user_name},\n  user: #{@user},\n  key: #{@key},\n  valid: #{@valid},\n  role: #{@role},\n  authorization_filter: #{@authorization_filter}\n,query_filters: #{@query_filters},\ntable_filters: #{@table_filters},\nalternative_user_keys: #{@alternative_user_keys}}"
end

#valid?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/jungle_path/authentication/identity.rb', line 34

def valid?
	@valid
end