Class: GrapeDeviseAuth::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/grape_devise_auth/configuration.rb

Constant Summary collapse

ACCESS_TOKEN_KEY =
'HTTP_ACCESS_TOKEN'
EXPIRY_KEY =
'HTTP_EXPIRY'
UID_KEY =
'HTTP_UID'
CLIENT_KEY =
'HTTP_CLIENT'
REQUEST_START =
'REQUEST_START'
CURRENT_AUTH_HEADERS =
'CURRENT_AUTH_HEADERS'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/grape_devise_auth/configuration.rb', line 18

def initialize
  @batch_request_buffer_throttle = 2.weeks
  @change_headers_on_each_request = true
  @default_provider = 'email'
  @token_lifespan = 2.weeks
  @max_number_of_devices = 10
  @headers_names = {:'access-token' => 'access-token',
                    :'client' => 'client',
                    :'expiry' => 'expiry',
                    :'uid' => 'uid',
                    :'token-type' => 'token-type' }
  @remove_tokens_after_password_reset = false
end

Instance Attribute Details

#batch_request_buffer_throttleObject

Returns the value of attribute batch_request_buffer_throttle.



3
4
5
# File 'lib/grape_devise_auth/configuration.rb', line 3

def batch_request_buffer_throttle
  @batch_request_buffer_throttle
end

#change_headers_on_each_requestObject

Returns the value of attribute change_headers_on_each_request.



3
4
5
# File 'lib/grape_devise_auth/configuration.rb', line 3

def change_headers_on_each_request
  @change_headers_on_each_request
end

#default_providerObject

Returns the value of attribute default_provider.



3
4
5
# File 'lib/grape_devise_auth/configuration.rb', line 3

def default_provider
  @default_provider
end

#headers_namesObject

Returns the value of attribute headers_names.



3
4
5
# File 'lib/grape_devise_auth/configuration.rb', line 3

def headers_names
  @headers_names
end

#max_number_of_devicesObject

Returns the value of attribute max_number_of_devices.



3
4
5
# File 'lib/grape_devise_auth/configuration.rb', line 3

def max_number_of_devices
  @max_number_of_devices
end

#remove_tokens_after_password_resetObject

Returns the value of attribute remove_tokens_after_password_reset.



3
4
5
# File 'lib/grape_devise_auth/configuration.rb', line 3

def remove_tokens_after_password_reset
  @remove_tokens_after_password_reset
end

#token_lifespanObject

Returns the value of attribute token_lifespan.



3
4
5
# File 'lib/grape_devise_auth/configuration.rb', line 3

def token_lifespan
  @token_lifespan
end