jwt

package
v0.0.0-...-e98fe29 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2014 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeToString

func EncodeToString(in []byte) string

Types

type Algorithm

type Algorithm interface {
	Sign(string) (string, error)
	Name() string
}

type JWT

type JWT struct {
	Header struct {
		Typ     string `json:"typ"`
		AlgName string `json:"alg"`
	}
	Claims map[string]interface{}
	Alg    Algorithm
}

func New

func New(alg Algorithm) *JWT

func (*JWT) Sign

func (j *JWT) Sign() (string, error)

type RsaAlg

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

func NewRsaAlg

func NewRsaAlg(input []byte) (*RsaAlg, error)

func (*RsaAlg) Name

func (alg *RsaAlg) Name() string

func (*RsaAlg) Sign

func (alg *RsaAlg) Sign(input string) (string, error)

Jump to

Keyboard shortcuts

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