filter

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const AuthorizationBasicScheme = "Basic"

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticationFilter

type AuthenticationFilter func(next AuthenticationHandler) AuthenticationHandler

AuthenticationFilter It's the part of security filter chain

func BasicAuthSecurityFilter

func BasicAuthSecurityFilter() (AuthenticationFilter, error)

func JwtAuthSecurityFilter

func JwtAuthSecurityFilter(props *config.JwtSecurityProperties) (AuthenticationFilter, error)

type AuthenticationHandler

type AuthenticationHandler func(w http.ResponseWriter, r *http.Request) authen.Authentication

AuthenticationHandler Handler function for authentication filter

var UnauthorizedHandler AuthenticationHandler = func(w http.ResponseWriter, r *http.Request) authen.Authentication {

	return nil
}

func CreateAuthenticationHandler

func CreateAuthenticationHandler(filters []AuthenticationFilter, stoppingHandler AuthenticationHandler) AuthenticationHandler

CreateAuthenticationHandler Creates the filter chain, and returns the authentication handler

Jump to

Keyboard shortcuts

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