credshelper

package
v0.0.0-...-0a7e599 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 16 Imported by: 2

Documentation

Overview

Package credshelper implements functionality to authenticate using an external credentials helper.

Index

Constants

View Source
const (
	// CredentialsHelper is using an externally provided binary to get credentials.
	CredentialsHelper = "CredentialsHelper"
	// CredshelperPathFlag is the path to the credentials helper binary.
	CredshelperPathFlag = "credentials_helper"
	// CredshelperArgsFlag is the flag used to pass in the arguments to the credentials helper binary.
	CredshelperArgsFlag = "credentials_helper_args"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	// contains filtered or unexported fields
}

Credentials provides auth functionalities using an external credentials helper

func NewExternalCredentials

func NewExternalCredentials(credshelper string, credshelperArgs []string) (*Credentials, error)

NewExternalCredentials creates credentials obtained from a credshelper.

func (*Credentials) PerRPCCreds

func (c *Credentials) PerRPCCreds() credentials.PerRPCCredentials

PerRPCCreds returns a perRPCCredentials for this credentials instance.

func (*Credentials) TokenSource

func (c *Credentials) TokenSource() *grpcOauth.TokenSource

TokenSource returns a token source for this credentials instance.

type Error

type Error struct {

	// ExitCode is the exit code for the error.
	ExitCode int
	// contains filtered or unexported fields
}

Error is an error occured during authenticating or initializing credentials.

type JSONOut

type JSONOut struct {
	Token   string            `json:"token"`
	Headers map[string]string `json:"headers"`
	Expiry  string            `json:"expiry"`
}

JSONOut is the struct to record the json output from the credshelper.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL