auth

package
v0.0.4-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(etcd *v3.Client, timeout time.Duration) error

func SessionManager

func SessionManager() session.Session

Types

type Config

type Config struct {
	Endpoint string     `json:"endpoint"`
	Admin    Credential `json:"admin"`
	Cli      Credential `json:"cli"`
}

func New

func New() *Config

func (*Config) Key

func (c *Config) Key() string

func (*Config) Validate

func (c *Config) Validate() error

type Credential

type Credential struct {
	Realm        string `json:"realm"`
	ClientId     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
	Login        string `json:"login"`
	Password     string `json:"password"`
	// contains filtered or unexported fields
}

func (*Credential) Token

func (cred *Credential) Token(client *gocloak.GoCloak, ctx context.Context) (*gocloak.JWT, error)

func (*Credential) Validate

func (cred *Credential) Validate() error

Jump to

Keyboard shortcuts

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