middleware

package
v0.0.0-...-f5bcdd4 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UsernameKey = "username"

Functions

This section is empty.

Types

type AuthOperator

type AuthOperator struct {
	// contains filtered or unexported fields
}

AuthOperator used to switch between different authentication strategy.

func (*AuthOperator) AuthFunc

func (operator *AuthOperator) AuthFunc() gin.HandlerFunc

AuthFunc execute resource authentication.

func (*AuthOperator) SetStrategy

func (operator *AuthOperator) SetStrategy(strategy AuthStrategy)

SetStrategy used to set to another authentication strategy.

type AuthStrategy

type AuthStrategy interface {
	AuthFunc() gin.HandlerFunc
}

AuthStrategy defines the set of methods used to do resource authentication.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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