access_token

package
v0.0.0-...-5646104 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessTokenClaims

type AccessTokenClaims struct {
	Uid string `json:"uid"`
	jwt.StandardClaims
}

func NewAccessTokenClaims

func NewAccessTokenClaims(uid uuid.UUID, exp time.Time, issuer string) *AccessTokenClaims

func ValidAccessToken

func ValidAccessToken(token string, sig []byte) (*AccessTokenClaims, error)

type AuthTokens

type AuthTokens struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	Expiration   int64  `json:"expiration"`
}

func GenerateTokens

func GenerateTokens(uid uuid.UUID, sig []byte) (*AuthTokens, error)

type RefreshTokenClaims

type RefreshTokenClaims struct {
	Uid string `json:"uid"`
	jwt.StandardClaims
}

func NewRefreshTokenClaims

func NewRefreshTokenClaims(uid uuid.UUID, exp time.Time, issuer string) *RefreshTokenClaims

Jump to

Keyboard shortcuts

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