types

package
v0.0.0-...-8ee006d Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SecretAccessToken         = ""
	ErrUnexpectedSigninMethod = errors.New("UNEXPECTED_SIGNIN_METHD")
	ErrSessionTokenHasNoEXP   = errors.New("NO_EXP_IN_TOKEN")
	ErrSessionTokenHasNoJTI   = errors.New("NO_JTI_IN_TOKEN")
)

Functions

This section is empty.

Types

type Session

type Session struct {
	Uid      string // session uid
	Username string // session username
	Email    string // session email
}

func NewSession

func NewSession(uid, username, email string) *Session

Generate new Session pointer structure

func (*Session) Decode

func (s *Session) Decode(token string) error

Decode - decode token to session object

func (*Session) Encode

func (s *Session) Encode() (string, error)

Encode - encode session structure to jwt token

Jump to

Keyboard shortcuts

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