security

package
v0.0.0-...-29bd094 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromJobRetention

func FromJobRetention(req *http.Request) bool

FromJobRetention detects whether this request is from tag retention job.

func FromJobservice

func FromJobservice(req *http.Request) bool

FromJobservice detects whether this request is from jobservice.

func GetClientIP

func GetClientIP(r *http.Request) string

GetClientIP get client ip from request

func GetUserAgent

func GetUserAgent(r *http.Request) string

GetUserAgent get the user agent of current request

func Middleware

func Middleware(skippers ...middleware.Skipper) func(http.Handler) http.Handler

Middleware returns a security context middleware that populates the security context into the request context

func UnauthorizedMiddleware

func UnauthorizedMiddleware(skippers ...middleware.Skipper) func(http.Handler) http.Handler

UnauthorizedMiddleware returns a security context middleware that populates the unauthorized security context when not security context found in the request context

Types

This section is empty.

Jump to

Keyboard shortcuts

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