userauth

package module
v0.0.0-...-ed03793 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	ID        string    `json:"id"`
	Username  string    `json:"username"`
	Email     string    `json:"email"`
	Name      string    `json:"name"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

func FromContext

func FromContext(ctx context.Context) *User

type UserAPI

type UserAPI interface {
	Authenticate(ctx context.Context, token string) (User, error)
}

type UserAuthMiddleware

type UserAuthMiddleware func(http.Handler) http.Handler

func ProvideUserAuthMiddleware

func ProvideUserAuthMiddleware(userApi UserAPI) UserAuthMiddleware

Directories

Path Synopsis
pb
Package userauthmock is a generated GoMock package.
Package userauthmock is a generated GoMock package.

Jump to

Keyboard shortcuts

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