utils

package
v0.0.0-...-df8baf0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package utils offers utility functions for parsing information from headers and cookies

Package utils offers utility functions for parsing information from headers and cookies

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateJWT

func CreateJWT() (string, error)

CreateJWT creates a new JSON Web Token

environment variable JWT_KEY is used to sign the token environment variable JWT_EXPIRATION_MINUTES is used to set the expiration

Types

type JWTMetadata

type JWTMetadata struct {
	Expiration int64
}

JWTMetadata contains any metadata about a JWT that is contained in its claims

func ParseJWTClaims

func ParseJWTClaims(claims jwt.MapClaims) (*JWTMetadata, error)

ParseJWTClaims extracts metadata that is contained within a JWT's claims

Jump to

Keyboard shortcuts

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