Module: RemoteUser

Defined in:
lib/remote_user/remote_user.rb

Defined Under Namespace

Classes: Error

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.attribute_mapObject

Returns the value of attribute attribute_map.



6
7
8
# File 'lib/remote_user/remote_user.rb', line 6

def attribute_map
  @attribute_map
end

.auth_keyObject

Returns the value of attribute auth_key.



6
7
8
# File 'lib/remote_user/remote_user.rb', line 6

def auth_key
  @auth_key
end

.auto_createObject

Returns the value of attribute auto_create.



6
7
8
# File 'lib/remote_user/remote_user.rb', line 6

def auto_create
  @auto_create
end

.env_keyObject

Returns the value of attribute env_key.



6
7
8
# File 'lib/remote_user/remote_user.rb', line 6

def env_key
  @env_key
end

.logout_urlObject

Returns the value of attribute logout_url.



6
7
8
# File 'lib/remote_user/remote_user.rb', line 6

def logout_url
  @logout_url
end

Class Method Details

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (RemoteUser)

    the object that the method was called on



28
29
30
# File 'lib/remote_user/remote_user.rb', line 28

def self.configure
  yield self
end

.remote_user_id(env) ⇒ Object



32
33
34
35
36
37
38
39
# File 'lib/remote_user/remote_user.rb', line 32

def self.remote_user_id(env)
  case env_key
  when Proc
    env_key.call(env)
  else
    env[env_key]
  end
end