Class: GrapeDeviseAuth::Configuration
- Inherits:
-
Object
- Object
- GrapeDeviseAuth::Configuration
- 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'- CURRENT_AUTH_HEADERS =
'CURRENT_AUTH_HEADERS'
Instance Attribute Summary collapse
-
#authenticate_all ⇒ Object
Returns the value of attribute authenticate_all.
-
#batch_request_buffer_throttle ⇒ Object
Returns the value of attribute batch_request_buffer_throttle.
-
#change_headers_on_each_request ⇒ Object
Returns the value of attribute change_headers_on_each_request.
-
#default_provider ⇒ Object
Returns the value of attribute default_provider.
-
#headers_names ⇒ Object
Returns the value of attribute headers_names.
-
#max_number_of_devices ⇒ Object
Returns the value of attribute max_number_of_devices.
-
#remove_tokens_after_password_reset ⇒ Object
Returns the value of attribute remove_tokens_after_password_reset.
-
#skip_middleware_unauthorized_error_raising ⇒ Object
Returns the value of attribute skip_middleware_unauthorized_error_raising.
-
#token_lifespan ⇒ Object
Returns the value of attribute token_lifespan.
Instance Method Summary collapse
- #auth_all? ⇒ Boolean
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/grape_devise_auth/configuration.rb', line 19 def initialize @batch_request_buffer_throttle = 2.weeks @change_headers_on_each_request = true @authenticate_all = false @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 @skip_middleware_unauthorized_error_raising = true end |
Instance Attribute Details
#authenticate_all ⇒ Object
Returns the value of attribute authenticate_all.
3 4 5 |
# File 'lib/grape_devise_auth/configuration.rb', line 3 def authenticate_all @authenticate_all end |
#batch_request_buffer_throttle ⇒ Object
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_request ⇒ Object
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_provider ⇒ Object
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_names ⇒ Object
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_devices ⇒ Object
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_reset ⇒ Object
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 |
#skip_middleware_unauthorized_error_raising ⇒ Object
Returns the value of attribute skip_middleware_unauthorized_error_raising.
3 4 5 |
# File 'lib/grape_devise_auth/configuration.rb', line 3 def @skip_middleware_unauthorized_error_raising end |
#token_lifespan ⇒ Object
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 |
Instance Method Details
#auth_all? ⇒ Boolean
35 36 37 |
# File 'lib/grape_devise_auth/configuration.rb', line 35 def auth_all? @authenticate_all end |