auth

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authenticate

func Authenticate(c *gin.Context) bool

Authenticate authenticates a user based on the Authorization header. It makes a request to the auth service to validate the token and retrieve user information.

func AuthenticateTEST added in v0.4.0

func AuthenticateTEST(c *gin.Context) bool

Authenticate authenticates a user based on the Authorization header. It makes a request to the auth service to validate the token and retrieve user information.

Types

type Branch

type Branch struct {
	Id int `json:"id"`
}

Branch represents a branch object.

type User

type User struct {
	Id       int      `json:"id"`
	Username string   `json:"username"`
	Branch   Branch   `json:"branch"`
	Roles    []string `json:"roles"`
}

User represents a user object.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳