Class: Remotus::Auth::Store
- Inherits:
-
Object
- Object
- Remotus::Auth::Store
- Defined in:
- lib/remotus/auth/store.rb
Overview
Authentication store base class
Direct Known Subclasses
Instance Method Summary collapse
-
#credential(_connection, **_options) ⇒ Object
Base method fo retrieving a credential from the hash store.
-
#password(connection, **options) ⇒ String
Gets the password for a given connection and options.
-
#user(connection, **options) ⇒ String
Gets the user for a given connection and options.
Instance Method Details
#credential(_connection, **_options) ⇒ Object
Base method fo retrieving a credential from the hash store. This must be overridden in derived classes or it will raise an exception.
14 15 16 |
# File 'lib/remotus/auth/store.rb', line 14 def credential(_connection, **) raise Remotus::MissingOverride, "credential method not implemented in credential store #{self.class}" end |
#password(connection, **options) ⇒ String
Gets the password for a given connection and options
38 39 40 |
# File 'lib/remotus/auth/store.rb', line 38 def password(connection, **) credential(connection, **)&.password end |
#user(connection, **options) ⇒ String
Gets the user for a given connection and options
26 27 28 |
# File 'lib/remotus/auth/store.rb', line 26 def user(connection, **) credential(connection, **)&.user end |