authorization

package
v0.0.0-...-37d7d24 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAuthorization

func CheckAuthorization(authorization_header string, permission string, checkPermissions bool) int

func CheckPermission

func CheckPermission(permissions []string, permissionNeeded string) bool

func CreateToken

func CreateToken(cid *string, permissions *[]string) (string, error)

Types

type Claim

type Claim struct {
	Permissions []string `json:"permissions"`
	ComputerID  string   `json:"cid"`
	Version     string   `json:"version"`
	jwt.StandardClaims
}

Jump to

Keyboard shortcuts

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