token

package
v0.0.0-...-3f9ec74 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JwtGenerator

type JwtGenerator interface {
	Sign(payload interface{}, privateKey []byte) (string, error)
}

func GetJwtGenerator

func GetJwtGenerator(alg string) JwtGenerator

type RS256Generator

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

func NewRS256

func NewRS256() RS256Generator

func (RS256Generator) Sign

func (j RS256Generator) Sign(payload interface{}, privateKey []byte) (string, error)

SignRS256 Sign payload with asymmetric algorithm RSA Signature with SHA-256

Jump to

Keyboard shortcuts

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