access_token

package
v0.0.0-...-ff5e644 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessToken

type AccessToken struct {
	AccessToken    string `json:"access_token"`
	RefreshToken   string `json:"refresh_token"`
	UserID         int64  `json:"user_id"`
	ClientID       int64  `json:"client_id,omitempty"`
	Expires        int64  `json:"expires"`
	ExpiresRefresh int64  `json:"expires_refresh"`
	AccessUuID     string `json:"access_uuid"`
	Permission     string `json:"permission"`
}

func GetNewAccessToken

func GetNewAccessToken(userId int64, clientId int64) AccessToken

func (*AccessToken) Generate

func (at *AccessToken) Generate(access_sicret string, refresh_sicret string) rest_errors.RestErr

func (AccessToken) IsExpired

func (at AccessToken) IsExpired() bool

func (*AccessToken) Validate

func (at *AccessToken) Validate() rest_errors.RestErr

type AccessTokenRequest

type AccessTokenRequest struct {
	UserID   int64  `json:"user_id"`
	ClientID int64  `json:"client_id"`
	UuID     string `json:"uuid"`
}

func (*AccessTokenRequest) Validate

func (at *AccessTokenRequest) Validate() rest_errors.RestErr

Jump to

Keyboard shortcuts

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