Class: InfisicalSDK::AuthClient

Inherits:
Object
  • Object
show all
Defined in:
lib/clients/auth.rb

Overview

Manage Infisical secrets.

Instance Method Summary collapse

Constructor Details

#initialize(command_runner) ⇒ AuthClient

Returns a new instance of AuthClient.



9
10
11
# File 'lib/clients/auth.rb', line 9

def initialize(command_runner)
  @command_runner = command_runner
end

Instance Method Details

#aws_iam_auth(identity_id:) ⇒ Object



60
61
62
63
64
65
66
67
# File 'lib/clients/auth.rb', line 60

def aws_iam_auth(identity_id:)

  response = infisical_execute_command(aws_iam_auth_login: AWSIamAuthMethod.new(
    identity_id: identity_id
  ))

  handle_auth_response(response)
end

#azure_auth(identity_id:) ⇒ Object



32
33
34
35
36
37
38
39
# File 'lib/clients/auth.rb', line 32

def azure_auth(identity_id:)

  response = infisical_execute_command(azure_auth_login: AzureAuthMethod.new(
    identity_id: identity_id
  ))

  handle_auth_response(response)
end

#gcp_iam_auth(identity_id:, service_account_key_file_path:) ⇒ Object



50
51
52
53
54
55
56
57
58
# File 'lib/clients/auth.rb', line 50

def gcp_iam_auth(identity_id:, service_account_key_file_path:)

  response = infisical_execute_command(gcp_iam_auth_login: GCPIamAuthMethod.new(
    identity_id: identity_id,
    service_account_key_file_path: 
  ))

  handle_auth_response(response)
end

#gcp_id_token_auth(identity_id:) ⇒ Object



41
42
43
44
45
46
47
48
# File 'lib/clients/auth.rb', line 41

def gcp_id_token_auth(identity_id:)

  response = infisical_execute_command(gcp_id_token_auth_login: GCPIDTokenAuthMethod.new(
    identity_id: identity_id
  ))

  handle_auth_response(response)
end

#kubernetes_auth(identity_id:, service_account_token_path:) ⇒ Object



22
23
24
25
26
27
28
29
30
# File 'lib/clients/auth.rb', line 22

def kubernetes_auth(identity_id:, service_account_token_path:)

  response = infisical_execute_command(kubernetes_auth_login: KubernetesAuthMethod.new(
    identity_id: identity_id,
    service_account_token_path: 
  ))

  handle_auth_response(response)
end

#universal_auth(client_id:, client_secret:) ⇒ Object



13
14
15
16
17
18
19
20
# File 'lib/clients/auth.rb', line 13

def universal_auth(client_id:, client_secret:)
  response = infisical_execute_command(universal_auth_login: UniversalAuthMethod.new(
    client_id: client_id,
    client_secret: client_secret
  ))

  handle_auth_response(response)
end