localsign

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 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 Signer with given key.

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