authentication

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidSTS              = errors.New("invalid sts")
	ErrNotImplemented          = errors.New("not implemented")
	ErrAlreadyExists           = errors.New("already exists")
	ErrInsufficientPermissions = errors.New("insufficient permissions")
	ErrUnexpectedStatusCode    = errors.New("unexpected status code")
	ErrInvalidRequest          = errors.New("invalid request")
)

Functions

This section is empty.

Types

type APIService

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

func NewAPIService

func NewAPIService(apiEndpoint string, validateIDTokenClaims map[string]string, logger logging.Logger) (*APIService, error)

func NewAPIServiceWithClients

func NewAPIServiceWithClients(apiClient apiclient.ClientWithResponsesInterface, logger logging.Logger, validateIDTokenClaims map[string]string) (*APIService, error)

func (*APIService) ValidateSTS

func (s *APIService) ValidateSTS(ctx context.Context, code, redirectURI, state string) (*STSResponseData, error)

ValidateSTS calls the external authentication service to validate the STS parameters validates the required claims and returns the external user id and expiration time

type DummyService

type DummyService struct{}

func NewDummyService

func NewDummyService() *DummyService

func (DummyService) ValidateSTS

func (d DummyService) ValidateSTS(ctx context.Context, code, redirectURI, state string) (*STSResponseData, error)

type STSResponseData

type STSResponseData struct {
	ExternalUserID    string
	ExpiresAtUnixTime int64
}

type Service

type Service interface {
	ValidateSTS(ctx context.Context, code, redirectURI, state string) (*STSResponseData, error)
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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