client

package
v1.147.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

Module for fx.

Functions

func IsEnabled added in v1.108.0

func IsEnabled(cfg *Config) bool

IsEnabled for client.

Types

type Client

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

Client for auth.

func NewClient

func NewClient(client v1.ServiceClient, config *v1c.Config) *Client

NewClient for auth.

func (*Client) GenerateServiceToken

func (c *Client) GenerateServiceToken(ctx context.Context, kind, audience string) (string, error)

GenerateServiceToken for client.

func (*Client) VerifyServiceToken

func (c *Client) VerifyServiceToken(ctx context.Context, token, kind, audience, action string) error

VerifyServiceToken for client.

type Config

type Config struct {
	V1 *v1.Config `yaml:"v1,omitempty" json:"v1,omitempty" toml:"v1,omitempty"`
}

Config for client.

type Token added in v1.44.0

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

Token for client.

func NewToken added in v1.44.0

func NewToken(client *Client) *Token

NewToken for client.

func (*Token) Generator added in v1.44.0

func (t *Token) Generator(kind, audience string) token.Generator

Generator for token.

func (*Token) Verifier added in v1.44.0

func (t *Token) Verifier(kind, audience, action string) token.Verifier

Verifier for token.

Directories

Path Synopsis
v1

Jump to

Keyboard shortcuts

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