auth

package
v0.0.0-...-acb99ff Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthProvider

type AuthProvider interface {
	VerifyToken(ctx context.Context, token string) (IDToken, error)
}

AuthProvider interface

func NewAuthProvider

func NewAuthProvider(ctx context.Context, issuer, audience string) AuthProvider

NewAuthProvider creates a new auth provider

type Claims

type Claims struct {
	Groups []string `json:"groups"`
	Email  string   `json:"email"`
}

type IDToken

type IDToken interface {
	GetClaims(out interface{}) error
}

IDToken interface

type IDTokenStruct

type IDTokenStruct struct {
	// contains filtered or unexported fields
}

IDTokenStruct instance variables

func (*IDTokenStruct) GetClaims

func (it *IDTokenStruct) GetClaims(out interface{}) error

GetClaims returns claims for the token

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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