Documentation
¶
Index ¶
Constants ¶
View Source
const AuthServiceKind string = "google"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthService ¶ added in v0.2.0
type AuthService struct {
Name string `yaml:"name"`
Kind string `yaml:"kind"`
ClientID string `yaml:"clientId"`
}
struct used to store auth service info
func (AuthService) AuthServiceKind ¶ added in v0.2.0
func (a AuthService) AuthServiceKind() string
Returns the auth service kind
func (AuthService) GetClaimsFromHeader ¶ added in v0.2.0
func (a AuthService) GetClaimsFromHeader(ctx context.Context, h http.Header) (map[string]any, error)
Verifies Google ID token and return claims
func (AuthService) GetName ¶ added in v0.2.0
func (a AuthService) GetName() string
Returns the name of the auth service
type Config ¶
type Config struct {
Name string `yaml:"name" validate:"required"`
Kind string `yaml:"kind" validate:"required"`
ClientID string `yaml:"clientId" validate:"required"`
}
Auth service configuration
func (Config) AuthServiceConfigKind ¶ added in v0.2.0
Returns the auth service kind
func (Config) Initialize ¶
func (cfg Config) Initialize() (auth.AuthService, error)
Initialize a Google auth service
Click to show internal directories.
Click to hide internal directories.