Class: OpenStax::Accounts::Configuration
- Inherits:
-
Object
- Object
- OpenStax::Accounts::Configuration
- Defined in:
- lib/openstax_accounts.rb
Instance Attribute Summary collapse
-
#default_errors_added_trigger ⇒ Object
Returns the value of attribute default_errors_added_trigger.
-
#default_errors_html_id ⇒ Object
Returns the value of attribute default_errors_html_id.
-
#default_errors_partial ⇒ Object
Returns the value of attribute default_errors_partial.
-
#enable_stubbing ⇒ Object
Returns the value of attribute enable_stubbing.
-
#logout_via ⇒ Object
Returns the value of attribute logout_via.
-
#openstax_accounts_url ⇒ Object
Returns the value of attribute openstax_accounts_url.
-
#openstax_application_id ⇒ Object
Returns the value of attribute openstax_application_id.
-
#openstax_application_secret ⇒ Object
Returns the value of attribute openstax_application_secret.
-
#security_transgression_exception ⇒ Object
Returns the value of attribute security_transgression_exception.
-
#user_provider ⇒ Object
See the “user_provider” discussion in the README.
Instance Method Summary collapse
- #enable_stubbing? ⇒ Boolean
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/openstax_accounts.rb', line 62 def initialize @openstax_application_id = 'SET ME!' @openstax_application_secret = 'SET ME!' @openstax_accounts_url = 'https://accounts.openstax.org/' @enable_stubbing = true @logout_via = :get @default_errors_partial = 'openstax/accounts/shared/attention' @default_errors_html_id = 'openstax-accounts-attention' @default_errors_added_trigger = 'openstax-accounts-errors-added' @security_transgression_exception = SecurityTransgression @user_provider = OpenStax::Accounts::UserProvider super end |
Instance Attribute Details
#default_errors_added_trigger ⇒ Object
Returns the value of attribute default_errors_added_trigger.
50 51 52 |
# File 'lib/openstax_accounts.rb', line 50 def default_errors_added_trigger @default_errors_added_trigger end |
#default_errors_html_id ⇒ Object
Returns the value of attribute default_errors_html_id.
49 50 51 |
# File 'lib/openstax_accounts.rb', line 49 def default_errors_html_id @default_errors_html_id end |
#default_errors_partial ⇒ Object
Returns the value of attribute default_errors_partial.
48 49 50 |
# File 'lib/openstax_accounts.rb', line 48 def default_errors_partial @default_errors_partial end |
#enable_stubbing ⇒ Object
Returns the value of attribute enable_stubbing.
45 46 47 |
# File 'lib/openstax_accounts.rb', line 45 def enable_stubbing @enable_stubbing end |
#logout_via ⇒ Object
Returns the value of attribute logout_via.
47 48 49 |
# File 'lib/openstax_accounts.rb', line 47 def logout_via @logout_via end |
#openstax_accounts_url ⇒ Object
Returns the value of attribute openstax_accounts_url.
46 47 48 |
# File 'lib/openstax_accounts.rb', line 46 def openstax_accounts_url @openstax_accounts_url end |
#openstax_application_id ⇒ Object
Returns the value of attribute openstax_application_id.
43 44 45 |
# File 'lib/openstax_accounts.rb', line 43 def openstax_application_id @openstax_application_id end |
#openstax_application_secret ⇒ Object
Returns the value of attribute openstax_application_secret.
44 45 46 |
# File 'lib/openstax_accounts.rb', line 44 def openstax_application_secret @openstax_application_secret end |
#security_transgression_exception ⇒ Object
Returns the value of attribute security_transgression_exception.
51 52 53 |
# File 'lib/openstax_accounts.rb', line 51 def security_transgression_exception @security_transgression_exception end |
#user_provider ⇒ Object
See the “user_provider” discussion in the README
54 55 56 |
# File 'lib/openstax_accounts.rb', line 54 def user_provider @user_provider end |
Instance Method Details
#enable_stubbing? ⇒ Boolean
76 77 78 |
# File 'lib/openstax_accounts.rb', line 76 def enable_stubbing? !Rails.env.production? && enable_stubbing end |