Class: Zitadel::Client::Auth::Authenticator
- Inherits:
-
Object
- Object
- Zitadel::Client::Auth::Authenticator
- Defined in:
- lib/zitadel/client/auth/authenticator.rb,
sig/lib.rbs
Overview
Abstract base class for authenticators.
This class defines the basic structure for any authenticator by requiring the implementation of a method to retrieve authentication headers, and provides a way to store and retrieve the host.
Direct Known Subclasses
NoAuthAuthenticator, OAuthAuthenticator, PersonalAccessTokenAuthenticator
Instance Attribute Summary collapse
-
#host ⇒ String
readonly
Returns the value of attribute host.
Instance Method Summary collapse
-
#auth_headers ⇒ Hash{String => String}
Retrieves the authentication headers to be sent with requests.
-
#initialize(host) ⇒ Authenticator
constructor
Initializes the Authenticator with the specified host.
Constructor Details
#initialize(host) ⇒ Authenticator
Initializes the Authenticator with the specified host.
24 25 26 |
# File 'lib/zitadel/client/auth/authenticator.rb', line 24 def initialize(host) @host = host end |
Instance Attribute Details
#host ⇒ String (readonly)
Returns the value of attribute host.
17 18 19 |
# File 'lib/zitadel/client/auth/authenticator.rb', line 17 def host @host end |
Instance Method Details
#auth_headers ⇒ Hash{String => String}
Retrieves the authentication headers to be sent with requests.
Subclasses must override this method to return the appropriate headers.
37 38 39 40 41 42 |
# File 'lib/zitadel/client/auth/authenticator.rb', line 37 def auth_headers # :nocov: raise NotImplementedError, "#{self.class}#get_auth_headers is an abstract method. Please override it in a subclass." # :nocov: end |