middlewares

package
v0.0.0-...-fa930de Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CORSMiddleware

func CORSMiddleware() gin.HandlerFunc

CORSMiddleware is a middleware function that enables us to interact with the React Frontend by setting the necessary headers

func TokenAuthMiddleware

func TokenAuthMiddleware() gin.HandlerFunc

Authz is a middleware that validates token and authorizes users It takes a gin.Context as an argument and returns a gin.HandlerFunc This function is responsible for validating the token sent by the client in the Authorization header and authorizing the user if the token is valid

Types

This section is empty.

Jump to

Keyboard shortcuts

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