google

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const AuthServiceType string = "google"

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService

type AuthService struct {
	Config
	// contains filtered or unexported fields
}

struct used to store auth service info

func (AuthService) AuthServiceType

func (a AuthService) AuthServiceType() string

Returns the auth service type

func (AuthService) GetAuthorizationServer added in v1.4.0

func (a AuthService) GetAuthorizationServer() string

func (AuthService) GetClaimsFromHeader

func (a AuthService) GetClaimsFromHeader(ctx context.Context, h http.Header) (map[string]any, error)

Verifies Google ID token and return claims

func (AuthService) GetName

func (a AuthService) GetName() string

Returns the name of the auth service

func (AuthService) GetScopesRequired added in v1.4.0

func (a AuthService) GetScopesRequired() []string

func (AuthService) IsMCPEnabled added in v1.4.0

func (a AuthService) IsMCPEnabled() bool

func (AuthService) ToConfig

func (a AuthService) ToConfig() auth.AuthServiceConfig

func (AuthService) ValidateMCPAuth added in v1.4.0

func (a AuthService) ValidateMCPAuth(ctx context.Context, h http.Header) (map[string]any, error)

ValidateMCPAuth handles MCP auth token validation for Google

type Config

type Config struct {
	Name           string   `yaml:"name" validate:"required"`
	Type           string   `yaml:"type" validate:"required"`
	ClientID       string   `yaml:"clientId"`
	Audience       string   `yaml:"audience"`
	McpEnabled     bool     `yaml:"mcpEnabled"`
	ScopesRequired []string `yaml:"scopesRequired"`
}

Auth service configuration

func (Config) AuthServiceConfigType

func (cfg Config) AuthServiceConfigType() string

Returns the auth service type

func (Config) Initialize

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

Initialize a Google auth service

Jump to

Keyboard shortcuts

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