Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Token ¶
type Token struct { AppID int64 UserID int64 AccessToken string `json:"access_token"` Expires int64 `json:"expires"` }
Token is the object for returning the token information.
func GetNewAccessToken ¶
GetNewAccessToken is a function to generate a new access token.
func (*Token) CreateToken ¶
func (token *Token) CreateToken() resterrors.RestErr
CreateToken is a method to create the token.
func (*Token) FindByAccessToken ¶
func (tk *Token) FindByAccessToken() resterrors.RestErr
FindByAccessToken the access token from the database or return a RestErr.
func (*Token) FindByAppUser ¶
func (tk *Token) FindByAppUser() resterrors.RestErr
FindByAppUser the access token from the database or return a RestErr.
func (*Token) Save ¶
func (tk *Token) Save() resterrors.RestErr
Save the access token in the database or return the RestErr.
func (*Token) Validate ¶
func (token *Token) Validate() resterrors.RestErr
Validate is a method to validate the AccessToken.
Click to show internal directories.
Click to hide internal directories.