Class: PrxAuth::Rails::Configuration
- Inherits:
-
Object
- Object
- PrxAuth::Rails::Configuration
- Defined in:
- lib/prx_auth/rails/configuration.rb
Constant Summary collapse
- DEFAULT_ID_HOST =
"id.prx.org"- DEFAULT_CERT_PATH =
"api/v1/certs"
Instance Attribute Summary collapse
-
#cert_path ⇒ Object
Returns the value of attribute cert_path.
-
#id_host ⇒ Object
Returns the value of attribute id_host.
-
#install_middleware ⇒ Object
Returns the value of attribute install_middleware.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#prx_client_id ⇒ Object
Returns the value of attribute prx_client_id.
-
#prx_scope ⇒ Object
Returns the value of attribute prx_scope.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/prx_auth/rails/configuration.rb', line 12 def initialize @install_middleware = true @prx_client_id = nil @prx_scope = nil @id_host = DEFAULT_ID_HOST @cert_path = DEFAULT_CERT_PATH # infer default namespace from app name @namespace = if defined?(::Rails) klass = ::Rails.application.class parent_name = if ::Rails::VERSION::MAJOR >= 6 klass.module_parent_name else klass.parent_name end klass_name = if parent_name.present? parent_name else klass.name end klass_name.underscore.intern end end |
Instance Attribute Details
#cert_path ⇒ Object
Returns the value of attribute cert_path.
2 3 4 |
# File 'lib/prx_auth/rails/configuration.rb', line 2 def cert_path @cert_path end |
#id_host ⇒ Object
Returns the value of attribute id_host.
2 3 4 |
# File 'lib/prx_auth/rails/configuration.rb', line 2 def id_host @id_host end |
#install_middleware ⇒ Object
Returns the value of attribute install_middleware.
2 3 4 |
# File 'lib/prx_auth/rails/configuration.rb', line 2 def install_middleware @install_middleware end |
#namespace ⇒ Object
Returns the value of attribute namespace.
2 3 4 |
# File 'lib/prx_auth/rails/configuration.rb', line 2 def namespace @namespace end |
#prx_client_id ⇒ Object
Returns the value of attribute prx_client_id.
2 3 4 |
# File 'lib/prx_auth/rails/configuration.rb', line 2 def prx_client_id @prx_client_id end |
#prx_scope ⇒ Object
Returns the value of attribute prx_scope.
2 3 4 |
# File 'lib/prx_auth/rails/configuration.rb', line 2 def prx_scope @prx_scope end |