jwt

package module
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package jwt handles some business related to JWT token.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetJWTToken

func GetJWTToken(req *http.Request) (jwt.Token, error)

GetJWTToken verify and return jwt token from http request, only accept bearer header.

Make sure you call Init before can use this.

func GetUserEmail

func GetUserEmail(req *http.Request) (email string, err error)

GetUserEmail return email private claim from jwt token in the http request

func Init

func Init(url, headerName string, refreshInterval time.Duration) error

Init initializes the package with

Types

This section is empty.

Jump to

Keyboard shortcuts

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