microsoft

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2026 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package microsoft implements theauth.Provider against the Microsoft identity platform v2.0 (Azure AD / Entra ID). Import this package only when you want Microsoft sign-in; the root theauth package has no hard dependency on it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config) theauth.Provider

New returns a Microsoft theauth.Provider with the supplied Config. Required fields: ClientID, ClientSecret.

Types

type Config

type Config struct {
	ClientID     string
	ClientSecret string
	Scopes       []string

	// Tenant selects which AAD authority to use. Valid values: "common"
	// (default, any work / school / personal Microsoft account),
	// "organizations" (work / school only), "consumers" (personal only),
	// or a tenant GUID / verified domain for single tenant apps.
	Tenant string

	// Endpoint overrides for tests. AuthorizeURL and TokenURL, if set,
	// bypass the Tenant substitution entirely (used verbatim).
	AuthorizeURL string
	TokenURL     string
	UserInfoURL  string

	HTTPClient *http.Client
}

Config is the provider's wiring. ClientID + ClientSecret are required. Tenant selects which AAD authority to use (default "common").

Jump to

Keyboard shortcuts

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