Class: Auth::AuthProvider
- Inherits:
-
Object
- Object
- Auth::AuthProvider
- Includes:
- ActiveModel::Serialization
- Defined in:
- lib/auth/auth_provider.rb
Class Method Summary collapse
Instance Method Summary collapse
- #background_color=(val) ⇒ Object
- #can_connect ⇒ Object
- #can_revoke ⇒ Object
- #full_screen_login=(val) ⇒ Object
- #full_screen_login_setting=(val) ⇒ Object
-
#initialize(params = {}) ⇒ AuthProvider
constructor
A new instance of AuthProvider.
- #message=(val) ⇒ Object
- #name ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ AuthProvider
Returns a new instance of AuthProvider.
6 7 8 |
# File 'lib/auth/auth_provider.rb', line 6 def initialize(params = {}) params.each { |key, value| public_send "#{key}=", value } end |
Class Method Details
.auth_attributes ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/auth/auth_provider.rb', line 10 def self.auth_attributes %i[ authenticator pretty_name title message frame_width frame_height pretty_name_setting title_setting full_screen_login full_screen_login_setting custom_url background_color icon ] end |
Instance Method Details
#background_color=(val) ⇒ Object
30 31 32 33 34 35 |
# File 'lib/auth/auth_provider.rb', line 30 def background_color=(val) Discourse.deprecate( "(#{authenticator.name}) background_color is no longer functional. Please use CSS instead", drop_from: "2.9.0", ) end |
#can_connect ⇒ Object
62 63 64 |
# File 'lib/auth/auth_provider.rb', line 62 def can_connect authenticator.can_connect_existing_user? end |
#can_revoke ⇒ Object
66 67 68 |
# File 'lib/auth/auth_provider.rb', line 66 def can_revoke authenticator.can_revoke? end |
#full_screen_login=(val) ⇒ Object
37 38 39 40 41 42 |
# File 'lib/auth/auth_provider.rb', line 37 def full_screen_login=(val) Discourse.deprecate( "(#{authenticator.name}) full_screen_login is now forced. The full_screen_login parameter can be removed from the auth_provider.", drop_from: "2.9.0", ) end |
#full_screen_login_setting=(val) ⇒ Object
44 45 46 47 48 49 |
# File 'lib/auth/auth_provider.rb', line 44 def full_screen_login_setting=(val) Discourse.deprecate( "(#{authenticator.name}) full_screen_login is now forced. The full_screen_login_setting parameter can be removed from the auth_provider.", drop_from: "2.9.0", ) end |
#message=(val) ⇒ Object
51 52 53 54 55 56 |
# File 'lib/auth/auth_provider.rb', line 51 def (val) Discourse.deprecate( "(#{authenticator.name}) message is no longer used because all logins are full screen. It should be removed from the auth_provider", drop_from: "2.9.0", ) end |
#name ⇒ Object
58 59 60 |
# File 'lib/auth/auth_provider.rb', line 58 def name authenticator.name end |