jwtservices

package
v0.0.0-...-7cbedea Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StringToKey

func StringToKey(str string) []byte

StringToKey convert str in byte string

Types

type Checker

type Checker interface {
	Check(payload string) ([]Tuple, error)
}

Checker can check some tuples over JWT

type Signer

type Signer interface {
	Sign(tuples ...Tuple) (string, error)
}

Signer can sign some tuples over JWT

type SignerChecker

type SignerChecker interface {
	Signer
	Checker
}

SignerChecker can sign and check tuples over JWT

type Tuple

type Tuple struct {
	Key    string      `json:"key"`
	Value  interface{} `json:"value"`
	Header bool        `json:"header"`
}

Tuple is injected in claims

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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