auth

package
v0.0.0-...-f79372e Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWrongContext         = errors.Unauthorized(reason, "wrong context for middleware")
	ErrMissingJwtToken      = errors.Unauthorized(reason, "no jwt token in context")
	ErrExtractSubjectFailed = errors.Unauthorized(reason, "extract subject failed")
)

Functions

func Server

func Server() middleware.Middleware

Server 衔接认证和权鉴

Types

type Result

type Result struct {
	UserId   uint32
	UserName string
}

func FromContext

func FromContext(ctx context.Context) (*Result, error)

Jump to

Keyboard shortcuts

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