serviceprincipal

package
v3.88.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Description                = "" /* 180-byte string literal not displayed */
	ErrConditionalAccessPolicy = errors.New("access blocked by Conditional Access policies (AADSTS53003)")
	ErrSecretInvalid           = errors.New("invalid client secret provided")
	ErrSecretExpired           = errors.New("the provided secret is expired")
	ErrTenantNotFound          = errors.New("tenant not found")
	ErrClientNotFoundInTenant  = errors.New("application was not found in tenant")
)

Functions

func VerifyCredentials

func VerifyCredentials(ctx context.Context, client *http.Client, tenantId string, clientId string, clientSecret string) (bool, map[string]string, error)

VerifyCredentials attempts to get a token using the provided client credentials. See: https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-client-creds-grant-flow#get-a-token

Types

type TokenErrResponse

type TokenErrResponse struct {
	Error       string `json:"error"`
	Description string `json:"error_description"`
}

type TokenOkResponse

type TokenOkResponse struct {
	AccessToken string `json:"access_token"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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