jwt

package
v0.0.0-...-e7b9fb6 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Payload

type Payload struct {
	IssuedAt int64  `json:"iat"`
	Expiry   int64  `json:"exp"`
	Audience string `json:"aud"`
	Issuer   string `json:"iss"`
	Subject  string `json:"sub"`
}

Payload contains data from middle part of JWT

type RSA256Signer

type RSA256Signer struct {
	PrivateKey string
	KeyID      string
	Issuer     string
	Subject    string
}

RSA256Signer is used for creating JWT using asymmetric keys

func (*RSA256Signer) GetJWT

func (input *RSA256Signer) GetJWT(audience string) (string, error)

GetJWT creates token for given audience

Jump to

Keyboard shortcuts

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