google

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const AuthSourceKind string = "google"

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthSource

type AuthSource struct {
	Name     string `yaml:"name"`
	Kind     string `yaml:"kind"`
	ClientID string `yaml:"clientId"`
}

struct used to store auth source info

func (AuthSource) AuthSourceKind

func (a AuthSource) AuthSourceKind() string

Returns the auth source kind

func (AuthSource) GetClaimsFromHeader

func (a AuthSource) GetClaimsFromHeader(h http.Header) (map[string]any, error)

Verifies Google ID token and return claims

func (AuthSource) GetName

func (a AuthSource) GetName() string

Returns the name of the auth source

type Config

type Config struct {
	Name     string `yaml:"name"`
	Kind     string `yaml:"kind"`
	ClientID string `yaml:"clientId"`
}

Auth source configuration

func (Config) AuthSourceConfigKind

func (cfg Config) AuthSourceConfigKind() string

Returns the auth source kind

func (Config) Initialize

func (cfg Config) Initialize() (auth.AuthSource, error)

Initialize a Google auth source

Jump to

Keyboard shortcuts

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