authentication

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// JWKS for Azure AD
	// Source: https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration
	AzureAdJwksUri = "https://login.microsoftonline.com/common/discovery/v2.0/keys"

	AzureAdV2IssuerFormat = "https://login.microsoftonline.com/" + azureAdTenantIdToken + "/v2.0/"
	AzureAdV1IssuerFormat = "https://sts.windows.net/" + azureAdTenantIdToken + "/"
)

Variables

This section is empty.

Functions

func FetchAzureADKeySet

func FetchAzureADKeySet(ctx context.Context) (jwk.Set, error)

fetchs the Azure AD key set

func GetAzureAdIssuers

func GetAzureAdIssuers(tenantId string) []string

Types

type JwtTokenValidationParameters

type JwtTokenValidationParameters struct {
	Issuers      []string
	Audience     string
	IssuerKeySet jwk.Set
}

type JwtTokenVerifier

type JwtTokenVerifier interface {
	// Verifies a jwt token
	Verify(ctx context.Context) (*jwt.Token, error)
}

Verify JWT tokens

func NewJwtTokenVerifier

func NewJwtTokenVerifier(rawToken *string, parameters *JwtTokenValidationParameters) JwtTokenVerifier

Creates a new JWT token verifier

Jump to

Keyboard shortcuts

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