auth

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviceCodeClient

type DeviceCodeClient struct {
	Tenant   string
	ClientID string
	Store    *store.TokenStore

	OnDeviceCode func(userCode, verificationURI string)
	// contains filtered or unexported fields
}

DeviceCodeClient authenticates with Microsoft identity via the device code flow and injects Bearer tokens into every outgoing HTTP request.

func NewDeviceCodeClient

func NewDeviceCodeClient(tenant, clientID string, st *store.TokenStore) *DeviceCodeClient

func (*DeviceCodeClient) AuthorizedClient

func (c *DeviceCodeClient) AuthorizedClient(ctx context.Context) *http.Client

AuthorizedClient returns an *http.Client whose every request carries a valid Bearer token.

func (*DeviceCodeClient) EnsureLogin

func (c *DeviceCodeClient) EnsureLogin(ctx context.Context) error

EnsureLogin verifies that a valid token is available, starting an interactive device-code flow if not.

Jump to

Keyboard shortcuts

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