Module: Easy::Configuration::Auth
- Defined in:
- lib/easy/configuration/auth.rb
Class Method Summary collapse
- .allow_anonymous_readonly_api? ⇒ Boolean
- .no_password_auth? ⇒ Boolean
- .omniauth_providers ⇒ Object
- .omniauth_providers_keys ⇒ Object
- .only_omniauth? ⇒ Boolean
- .required? ⇒ Boolean
- .social_sign_in? ⇒ Boolean
- .token_auth? ⇒ Boolean
Class Method Details
.allow_anonymous_readonly_api? ⇒ Boolean
34 35 36 |
# File 'lib/easy/configuration/auth.rb', line 34 def allow_anonymous_readonly_api? !!self.allow_anonymous_readonly_api end |
.no_password_auth? ⇒ Boolean
26 27 28 |
# File 'lib/easy/configuration/auth.rb', line 26 def no_password_auth? !!self.no_password_auth end |
.omniauth_providers ⇒ Object
42 43 44 |
# File 'lib/easy/configuration/auth.rb', line 42 def omniauth_providers Rails.application.secrets.omniauth_providers || {} end |
.omniauth_providers_keys ⇒ Object
46 47 48 |
# File 'lib/easy/configuration/auth.rb', line 46 def omniauth_providers_keys omniauth_providers.keys end |
.only_omniauth? ⇒ Boolean
38 39 40 |
# File 'lib/easy/configuration/auth.rb', line 38 def only_omniauth? !!self.only_omniauth end |
.required? ⇒ Boolean
22 23 24 |
# File 'lib/easy/configuration/auth.rb', line 22 def required? !!self.required end |
.social_sign_in? ⇒ Boolean
50 51 52 |
# File 'lib/easy/configuration/auth.rb', line 50 def (i(facebook google_oauth2 twitter linkedin) & omniauth_providers_keys).present? end |
.token_auth? ⇒ Boolean
30 31 32 |
# File 'lib/easy/configuration/auth.rb', line 30 def token_auth? !!self.token_auth end |