credentials

package
v0.0.1-alpha.8 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MicrosoftGraphScope       = "https://graph.microsoft.com/.default"
	AzureResourceManagerScope = "https://management.azure.com/.default"
	DefaultTenantID           = "organizations"
)

Variables

This section is empty.

Functions

func ClearCache

func ClearCache(profileName string) error

func GetCachedAuthenticationRecord

func GetCachedAuthenticationRecord(profileName string) (azidentity.AuthenticationRecord, error)

Types

type Credential

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

func NewCached

func NewCached(profileName string) (*Credential, error)

func NewUncached

func NewUncached(credentialMethod CredentialMethod, tenantID string, clientID string, scopes []string, profileName string) (*Credential, error)

func (*Credential) Authenticate

func (*Credential) GetToken

type CredentialMethod

type CredentialMethod int
const (
	UnknownCredentialMethod CredentialMethod = iota
	DeviceCodeCredentialMethod
	InteractiveBrowserCredentialMethod
)

func (*CredentialMethod) CobraCompletion

func (m *CredentialMethod) CobraCompletion(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

func (*CredentialMethod) HelpText

func (m *CredentialMethod) HelpText() string

func (*CredentialMethod) Set

func (m *CredentialMethod) Set(v string) error

func (*CredentialMethod) String

func (m *CredentialMethod) String() string

func (*CredentialMethod) Type

func (m *CredentialMethod) Type() string

Jump to

Keyboard shortcuts

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