slurmjwt

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseTokenClaims

func ParseTokenClaims(tokenString string, signingKey []byte) (jwt.MapClaims, error)

func VerifyToken

func VerifyToken(tokenString string, signingKey []byte) (bool, error)

Types

type Token

type Token struct {
	// contains filtered or unexported fields
}

func NewToken

func NewToken(signingKey []byte) *Token

func (*Token) NewSignedToken

func (t *Token) NewSignedToken() (string, error)

func (*Token) WithLifetime

func (t *Token) WithLifetime(lifetime time.Duration) *Token

func (*Token) WithUsername

func (t *Token) WithUsername(username string) *Token

type TokenClaims

type TokenClaims struct {
	jwt.RegisteredClaims `json:",inline"`

	SlurmUsername string `json:"sun"`
}

Ref: https://slurm.schedmd.com/jwt.html#compatibility

Jump to

Keyboard shortcuts

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