msentraid

package
v0.0.0-...-a194ef4 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Overview

Package msentraid is the Microsoft Entra ID specific extension.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

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

Provider is the Microsoft Entra ID provider implementation.

func New

func New() Provider

New returns a new MSEntraID provider.

func (Provider) AdditionalScopes

func (p Provider) AdditionalScopes() []string

AdditionalScopes returns the generic scopes required by the EntraID provider.

func (Provider) AuthOptions

func (p Provider) AuthOptions() []oauth2.AuthCodeOption

AuthOptions returns the generic auth options required by the EntraID provider.

func (Provider) CheckTokenScopes

func (p Provider) CheckTokenScopes(token *oauth2.Token) error

CheckTokenScopes checks if the token has the required scopes.

func (Provider) CurrentAuthenticationModesOffered

func (p Provider) CurrentAuthenticationModesOffered(
	sessionMode string,
	supportedAuthModes map[string]string,
	tokenExists bool,
	providerReachable bool,
	endpoints map[string]struct{},
	currentAuthStep int,
) ([]string, error)

CurrentAuthenticationModesOffered returns the generic authentication modes supported by the provider.

Token validity is not considered, only the presence of a token.

func (Provider) GetExtraFields

func (p Provider) GetExtraFields(token *oauth2.Token) map[string]interface{}

GetExtraFields returns the extra fields of the token which should be stored persistently.

func (Provider) GetUserInfo

func (p Provider) GetUserInfo(ctx context.Context, accessToken *oauth2.Token, idToken *oidc.IDToken) (info.User, error)

GetUserInfo is a no-op when no specific provider is in use.

func (Provider) VerifyUsername

func (p Provider) VerifyUsername(requestedUsername, authenticatedUsername string) error

VerifyUsername checks if the authenticated username matches the requested username and that both are valid.

Jump to

Keyboard shortcuts

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