Class: Zitadel::Client::Auth::ClientCredentialsAuthenticator::ClientCredentialsAuthenticatorBuilder

Inherits:
OAuthAuthenticatorBuilder
  • Object
show all
Defined in:
lib/zitadel/client/auth/client_credentials_authenticator.rb

Overview

Builder class for ClientCredentialsAuthenticator.

Instance Method Summary collapse

Methods inherited from OAuthAuthenticatorBuilder

#scopes

Constructor Details

#initialize(host, client_id, client_secret) ⇒ ClientCredentialsAuthenticatorBuilder

Initializes the builder with host, client ID, and client secret.



48
49
50
51
52
53
# File 'lib/zitadel/client/auth/client_credentials_authenticator.rb', line 48

def initialize(host, client_id, client_secret)
  # noinspection RubyArgCount
  super(host)
  @client_id = client_id
  @client_secret = client_secret
end

Instance Method Details

#buildClientCredentialsAuthenticator

Constructs and returns a ClientCredentialsAuthenticator using the configured parameters.



58
59
60
# File 'lib/zitadel/client/auth/client_credentials_authenticator.rb', line 58

def build
  ClientCredentialsAuthenticator.new(open_id, @client_id, @client_secret, auth_scopes)
end