internal

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAccessTokenNotFound = fmt.Errorf("access token not found")
View Source
var ErrAuthResultNotFound = fmt.Errorf("auth result not found")
View Source
var ErrInvalidIDPResponse = fmt.Errorf("invalid identity provider response")
View Source
var ErrRawTokenNotFound = fmt.Errorf("raw token not found")

Functions

func IsClosed

func IsClosed(ch <-chan struct{}) bool

IsClosed checks if a channel is closed.

NOTE: It returns true if the channel is closed as well as if the channel is not empty. Used internally to check if the channel is closed.

Types

type IDPResp

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

IDPResp represents a response from an Identity Provider (IDP) It can contain either an AuthResult, AccessToken, or a raw token string

func NewIDPResp

func NewIDPResp(resultType string, result interface{}) (*IDPResp, error)

NewIDPResp creates a new IDPResp with the given values It validates the input and ensures the response type matches the provided value

func (*IDPResp) AccessToken

func (a *IDPResp) AccessToken() (azcore.AccessToken, error)

AccessToken returns the AccessToken if present, or an empty AccessToken if not set Use HasAccessToken() to check if the value is actually set

func (*IDPResp) AuthResult

func (a *IDPResp) AuthResult() (public.AuthResult, error)

AuthResult returns the AuthResult if present, or an empty AuthResult if not set Use HasAuthResult() to check if the value is actually set

func (*IDPResp) RawToken

func (a *IDPResp) RawToken() (string, error)

RawToken returns the raw token string

func (*IDPResp) Type

func (a *IDPResp) Type() string

Type returns the type of response this IDPResp represents

Jump to

Keyboard shortcuts

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