auth

package
v1.1.22 Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessToken added in v1.1.3

type AccessToken struct {
	Token     string    `json:"token"`
	ExpiresAt time.Time `json:"expires_at"`
}

type Auth

type Auth interface {
	Guard(name string) Auth
	Parse(ctx *frame.Context, token string, user User) error
	User(ctx *frame.Context, user User) error
	Login(ctx *frame.Context, user User, data ...map[string]any) (token *AccessToken, err error)
	LoginUsingID(ctx *frame.Context, id interface{}) (token *AccessToken, err error)
	Refresh(ctx *frame.Context) (token *AccessToken, err error)
	Data(ctx *frame.Context) (map[string]any, error)
	Logout(ctx *frame.Context) error
}

type User

type User interface {
	Authenticated() bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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