auth

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package auth provides an Azure AD (MSAL) token provider implementation backed by a persistent MSAL cache. It supports silent authentication with fallback to interactive or device-code flows.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MSALTokenProvider

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

MSALTokenProvider implements azcore.TokenCredential using the Microsoft Authentication Library (MSAL). Tokens are acquired silently from cache when possible and fall back to the configured interactive or device-code flow.

func GetMSALTokenProvider

func GetMSALTokenProvider(cfg *config.AuthConfig) (*MSALTokenProvider, error)

func NewMSALTokenProvider

func NewMSALTokenProvider(cfg *config.AuthConfig) (*MSALTokenProvider, error)

NewMSALTokenProvider creates a token provider backed by a persistent MSAL cache stored in the user's cache directory.

func (*MSALTokenProvider) GetToken

GetToken implements azcore.TokenCredential.

It attempts to acquire a token silently using cached accounts. If no matching account is found or silent acquisition fails, it falls back to the configured authentication flow.

Jump to

Keyboard shortcuts

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