auth

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBasic

func NewBasic(username, password string, next http.Handler) http.Handler

func NewOIDC

func NewOIDC(ctx context.Context, cfg Config, next http.Handler) (http.Handler, error)

func WithUser

func WithUser(ctx context.Context, user User) context.Context

Types

type Config

type Config struct {
	IssuerURL    string
	ClientID     string
	ClientSecret string
	ServerURL    string // optional
}

type User

type User struct {
	Name string
}

func UserFromContext

func UserFromContext(ctx context.Context) *User

Jump to

Keyboard shortcuts

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