Documentation ¶
Index ¶
- Variables
- type APIService
- func (s *APIService) ExternalPrincipalLogin(ctx context.Context, identityRequest map[string]interface{}) (*apiclient.ExternalPrincipal, error)
- func (s *APIService) IsExternalPrincipalsEnabled() bool
- func (s *APIService) ValidateSTS(ctx context.Context, code, redirectURI, state string) (string, error)
- type DummyService
- type Service
Constants ¶
This section is empty.
Variables ¶
View Source
var ( 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") ErrSessionExpired = errors.New("session expired") ErrInvalidTokenFormat = errors.New("invalid token format") )
Functions ¶
This section is empty.
Types ¶
type APIService ¶
type APIService struct {
// contains filtered or unexported fields
}
func NewAPIService ¶
func NewAPIServiceWithClients ¶
func NewAPIServiceWithClients(apiClient apiclient.ClientWithResponsesInterface, logger logging.Logger, validateIDTokenClaims map[string]string, externalPrincipalsEnabled bool) (*APIService, error)
func (*APIService) ExternalPrincipalLogin ¶ added in v1.18.0
func (s *APIService) ExternalPrincipalLogin(ctx context.Context, identityRequest map[string]interface{}) (*apiclient.ExternalPrincipal, error)
func (*APIService) IsExternalPrincipalsEnabled ¶ added in v1.18.0
func (s *APIService) IsExternalPrincipalsEnabled() bool
func (*APIService) ValidateSTS ¶
func (s *APIService) ValidateSTS(ctx context.Context, code, redirectURI, state string) (string, 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) ExternalPrincipalLogin ¶ added in v1.18.0
func (d DummyService) ExternalPrincipalLogin(_ context.Context, _ map[string]interface{}) (*apiclient.ExternalPrincipal, error)
func (DummyService) IsExternalPrincipalsEnabled ¶ added in v1.18.0
func (d DummyService) IsExternalPrincipalsEnabled() bool
func (DummyService) ValidateSTS ¶
type Service ¶
type Service interface { IsExternalPrincipalsEnabled() bool ExternalPrincipalLogin(ctx context.Context, identityRequest map[string]interface{}) (*apiclient.ExternalPrincipal, error) // ValidateSTS validates the STS parameters and returns the external user ID ValidateSTS(ctx context.Context, code, redirectURI, state string) (string, error) }
Click to show internal directories.
Click to hide internal directories.