jti

package
v0.0.0-...-72324ba 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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Db

type Db interface {
	// 保存。
	// 発行者と ID が既存の有効期限が切れていないものと重複する場合は失敗する。
	SaveIfAbsent(elem *Element) (ok bool, err error)
}

JWT の ID の格納庫。

func NewMemoryDb

func NewMemoryDb() Db

func NewRedisDb

func NewRedisDb(pool *redis.Pool, tag string) Db

type Element

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

JWT の ID。

func New

func New(iss, id string, exp time.Time) *Element

func (*Element) Expires

func (this *Element) Expires() time.Time

有効期限を返す。

func (*Element) Id

func (this *Element) Id() string

ID を返す。

func (*Element) Issuer

func (this *Element) Issuer() string

発行者を返す。

Jump to

Keyboard shortcuts

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