jwt

package
v0.0.0-...-69e45e2 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2015 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

JWT 関係。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashGenerator

func HashGenerator(alg string) crypto.Hash

Types

type Jwt

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

JSON Web Token

func New

func New() *Jwt

func Parse

func Parse(data []byte) (*Jwt, error)

Compact serialization を読み取る。

func (*Jwt) Claim

func (this *Jwt) Claim(tag string) interface{}

func (*Jwt) ClaimNames

func (this *Jwt) ClaimNames() []string

func (*Jwt) Decrypt

func (this *Jwt) Decrypt(keys []jwk.Key) (err error)

func (*Jwt) Encode

func (this *Jwt) Encode() ([]byte, error)

Compact serialization にする。

func (*Jwt) Encrypt

func (this *Jwt) Encrypt(keys []jwk.Key) error

func (*Jwt) Header

func (this *Jwt) Header(tag string) interface{}

func (*Jwt) IsEncrypted

func (this *Jwt) IsEncrypted() bool

func (*Jwt) IsSigned

func (this *Jwt) IsSigned() bool

func (*Jwt) RawBody

func (this *Jwt) RawBody() []byte

func (*Jwt) RawHeader

func (this *Jwt) RawHeader() []byte

func (*Jwt) SetClaim

func (this *Jwt) SetClaim(tag string, val interface{})

val が nil なら削除する。

func (*Jwt) SetHeader

func (this *Jwt) SetHeader(tag string, val interface{})

val が nil なら削除する。

func (*Jwt) SetRawBody

func (this *Jwt) SetRawBody(raw []byte)

func (*Jwt) SetRawHeader

func (this *Jwt) SetRawHeader(raw []byte)

func (*Jwt) Sign

func (this *Jwt) Sign(keys []jwk.Key) error

func (*Jwt) Verify

func (this *Jwt) Verify(keys []jwk.Key) (err error)

Directories

Path Synopsis
JWT の aud クレーム。
JWT の aud クレーム。

Jump to

Keyboard shortcuts

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