Class: Zitadel::Client::Auth::OAuthAuthenticatorBuilder
- Inherits:
-
Object
- Object
- Zitadel::Client::Auth::OAuthAuthenticatorBuilder
- Defined in:
- lib/zitadel/client/auth/authenticator.rb,
sig/lib.rbs
Overview
Abstract builder class for constructing OAuth authenticator instances.
This builder provides common configuration options such as the OpenId instance and authentication scopes.
Direct Known Subclasses
ClientCredentialsAuthenticator::ClientCredentialsAuthenticatorBuilder, WebTokenAuthenticator::WebTokenAuthenticatorBuilder
Instance Attribute Summary collapse
-
#auth_scopes ⇒ Set[String]
readonly
Returns the value of attribute auth_scopes.
-
#open_id ⇒ OpenId
readonly
Returns the value of attribute open_id.
Instance Method Summary collapse
-
#initialize(host, transport_options: nil) ⇒ OAuthAuthenticatorBuilder
constructor
Initializes the OAuthAuthenticatorBuilder with a given host.
-
#scopes(*scopes) ⇒ self
Sets the authentication scopes for the OAuth authenticator.
Constructor Details
#initialize(host, transport_options: nil) ⇒ OAuthAuthenticatorBuilder
Initializes the OAuthAuthenticatorBuilder with a given host.
61 62 63 64 65 66 |
# File 'lib/zitadel/client/auth/authenticator.rb', line 61 def initialize(host, transport_options: nil) ||= TransportOptions.defaults @transport_options = @open_id = OpenId.new(host, transport_options: ) @auth_scopes = Set.new(%w[openid urn:zitadel:iam:org:project:id:zitadel:aud]) end |
Instance Attribute Details
#auth_scopes ⇒ Set[String] (readonly)
Returns the value of attribute auth_scopes.
53 54 55 |
# File 'lib/zitadel/client/auth/authenticator.rb', line 53 def auth_scopes @auth_scopes end |
#open_id ⇒ OpenId (readonly)
Returns the value of attribute open_id.
53 54 55 |
# File 'lib/zitadel/client/auth/authenticator.rb', line 53 def open_id @open_id end |
Instance Method Details
#scopes(*scopes) ⇒ self
Sets the authentication scopes for the OAuth authenticator.
76 77 78 79 |
# File 'lib/zitadel/client/auth/authenticator.rb', line 76 def scopes(*scopes) @auth_scopes = Set.new(scopes) self end |