auth

package
v0.40.2 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAuthTokenIfNeeded

func GetAuthTokenIfNeeded(logger zerolog.Logger, sources []*specs.Source, destinations []*specs.Destination, transformers []*specs.Transformer) (cqapiauth.Token, error)

func GetTeamForToken

func GetTeamForToken(ctx context.Context, token auth.Token) (string, error)

GetTeamForToken returns the team for the given token If the token is a bearer token, we need to get the team from the configuration. For api keys the team name is not required as the key is bound to a team name already.

func GetTokenType

func GetTokenType() cqapiauth.TokenType

func GetUser

func GetUser(ctx context.Context, token auth.Token) (*cqapi.User, error)

func IsTeamInternal

func IsTeamInternal(ctx context.Context, team string) (bool, error)

IsTeamInternal checks if the team has the internal flag set We store this in the configuration on team switch.

func Logout

func Logout() error

Types

This section is empty.

Jump to

Keyboard shortcuts

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