server

package
v0.0.0-...-e8464d3 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2018 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunAuthServer

func RunAuthServer() error

Types

type Cmd

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

func (*Cmd) Flags

func (c *Cmd) Flags()

func (*Cmd) Run

func (c *Cmd) Run(args []string) error

func (*Cmd) Usage

func (c *Cmd) Usage() string

type Ctx

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

type RefreshTokenStorage

type RefreshTokenStorage struct {
	jwt.IRefreshTokenStorage
	// contains filtered or unexported fields
}

func NewRefreshTokenStorage

func NewRefreshTokenStorage(driver, dbconnect string) (*RefreshTokenStorage, error)

func (*RefreshTokenStorage) Delete

func (ts *RefreshTokenStorage) Delete(token string) error

Delete refresh token from storage

func (*RefreshTokenStorage) IsExpired

func (ts *RefreshTokenStorage) IsExpired(token string) bool

Check is refresh token already expired

func (*RefreshTokenStorage) IsRevoked

func (ts *RefreshTokenStorage) IsRevoked(token string) bool

Check is refresh token was revoked

func (*RefreshTokenStorage) Issue

func (ts *RefreshTokenStorage) Issue() (string, error)

Generate refresh token

func (*RefreshTokenStorage) Revoke

func (ts *RefreshTokenStorage) Revoke(token string, accessTokenTimeout time.Duration) error

Revoke refresh token

func (*RefreshTokenStorage) Update

func (ts *RefreshTokenStorage) Update(token string, refreshTimeout time.Duration, payload map[string]interface{}, c *gin.Context) error

Add/Update refresh token in storage

type Session

type Session struct {
	Expire int64 `sql:"expire"`
	Token  int64 `sql:"token"`
}

Jump to

Keyboard shortcuts

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