auth

package
v3.65.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FieldSpec

func FieldSpec() docs.FieldSpec

FieldSpec returns documentation authentication specs for Pulsar components

Types

type Config

type Config struct {
	OAuth2 OAuth2Config `json:"oauth2" yaml:"oauth2"`
	Token  TokenConfig  `json:"token" yaml:"token"`
}

Config contains configuration params for Pulsar authentication.

func New

func New() Config

New creates a new Config instance.

func (*Config) Validate

func (c *Config) Validate() error

Validate checks whether Config is valid.

type OAuth2Config

type OAuth2Config struct {
	Enabled        bool   `json:"enabled" yaml:"enabled"`
	Audience       string `json:"audience" yaml:"audience"`
	IssuerURL      string `json:"issuer_url" yaml:"issuer_url"`
	PrivateKeyFile string `json:"private_key_file" yaml:"private_key_file"`
}

OAuth2Config contains configuration params for Pulsar OAuth2 authentication.

func NewOAuth

func NewOAuth() OAuth2Config

NewOAuth creates a new OAuth2Config instance.

func (*OAuth2Config) ToMap added in v3.62.0

func (c *OAuth2Config) ToMap() map[string]string

ToMap returns OAuth2Config as a map representing OAuth2 client credentails.

func (*OAuth2Config) Validate

func (c *OAuth2Config) Validate() error

Validate checks whether OAuth2Config is valid.

type TokenConfig

type TokenConfig struct {
	Enabled bool   `json:"enabled" yaml:"enabled"`
	Token   string `json:"token" yaml:"token"`
}

TokenConfig contains configuration params for Pulsar Token authentication.

func NewToken

func NewToken() TokenConfig

NewToken creates a new TokenConfig instance.

func (*TokenConfig) Validate

func (c *TokenConfig) Validate() error

Validate checks whether TokenConfig is valid.

Jump to

Keyboard shortcuts

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