tools

package
v0.0.0-...-432ee57 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeJWT

func DecodeJWT(tokenReader io.Reader, isJWS, isJWE bool, opts *VerificationOptions) (interface{}, interface{}, error)

func EncodeJWT

func EncodeJWT(jsonReader io.Reader, opts *EncodingOptions) (string, error)

func ReadEncryptionKey

func ReadEncryptionKey(u *url.URL) (jose.KeyAlgorithm, jose.ContentEncryption, crypto.PublicKey, crypto.PrivateKey, error)

func ReadSigningKey

func ReadSigningKey(u *url.URL) (jose.SignatureAlgorithm, crypto.PublicKey, crypto.PrivateKey, error)

Types

type DecryptionKeyProviderFunc

type DecryptionKeyProviderFunc func() (interface{}, error)

func DecryptionKeyHandlerFunc

func DecryptionKeyHandlerFunc(u *url.URL) DecryptionKeyProviderFunc

type EncodingOptions

type EncodingOptions struct {
	SignatureAlgorithm jose.SignatureAlgorithm
	SigningKey         crypto.PrivateKey

	EncryptionKeyAlgorithm     jose.KeyAlgorithm
	EncryptionContentAlgorithm jose.ContentEncryption
	EncryptionKey              crypto.PublicKey

	KeyId string
}

func (*EncodingOptions) String

func (eopts *EncodingOptions) String() string

type JSONWebKeySetProviderFunc

type JSONWebKeySetProviderFunc func() (*jose.JSONWebKeySet, error)

func JkwsHandlerFunc

func JkwsHandlerFunc(u *url.URL) JSONWebKeySetProviderFunc

type VerificationOptions

type VerificationOptions struct {
	JkwsFunc          JSONWebKeySetProviderFunc
	DecryptionKeyFunc DecryptionKeyProviderFunc
}

Jump to

Keyboard shortcuts

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