basicauth

package
v0.10.14 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderName = "basicauth"

Functions

This section is empty.

Types

type Credential

type Credential struct {
	Username    string
	Password    string
	Permissions []string
}

type Provider

type Provider struct {
	Credentials []Credential
}

func New

func New(credentials ...Credential) *Provider

func (Provider) ChangePassword added in v0.9.0

func (p Provider) ChangePassword(ctx *fasthttp.RequestCtx) (bool, map[string]error)

func (Provider) GetPermissions added in v0.10.0

func (p Provider) GetPermissions(ctx *fasthttp.RequestCtx) []string

func (Provider) GetProviderName

func (p Provider) GetProviderName() string

func (Provider) GetUniqueIdentifier

func (p Provider) GetUniqueIdentifier(ctx *fasthttp.RequestCtx) string

func (Provider) IsAuthenticated

func (p Provider) IsAuthenticated(ctx *fasthttp.RequestCtx) bool

func (Provider) Login

func (p Provider) Login(ctx *fasthttp.RequestCtx) (bool, map[string]error)

func (Provider) Logout

func (p Provider) Logout(ctx *fasthttp.RequestCtx) bool

func (Provider) Register

func (p Provider) Register(ctx *fasthttp.RequestCtx) (bool, map[string]error)

Jump to

Keyboard shortcuts

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