jwt

package
v0.0.1-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateForToken

func GenerateForToken(token *types.Token, secret string) (string, error)

GenerateForToken generates a jwt for a given token.

Types

type Claims

type Claims struct {
	jwt.StandardClaims

	PrincipalID int64 `json:"pid,omitempty"`

	Token *SubClaimsToken `json:"tkn,omitempty"`
}

Claims defines Cloudness jwt claims.

type SubClaimsToken

type SubClaimsToken struct {
	Type enum.TokenType `json:"typ,omitempty"`
	ID   int64          `json:"id,omitempty"`
}

SubClaimsToken contains information about the token the JWT was created for.

Jump to

Keyboard shortcuts

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