localsign

package
v0.9.15 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package localsign contains a jwt signer use jose/jwt.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Signer

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

Signer can sign jwt.

func New

func New(k *testkeys.Key) *Signer

New RS256 Signer with given key.

func NewRS384Signer added in v0.9.13

func NewRS384Signer(k *testkeys.Key) *Signer

NewRS384Signer use RS384 to sign jwt

func (*Signer) PublicKeys

func (s *Signer) PublicKeys() *jose.JSONWebKeySet

PublicKeys in signer.

func (*Signer) SignJWT

func (s *Signer) SignJWT(ctx context.Context, claims interface{}, header map[string]string) (string, error)

SignJWT signs the given claims return the jwt string.

Jump to

Keyboard shortcuts

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