Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type AccessToken struct { Access_Token string `json:"access_token"` UserId int64 `json:"user_id"` ClientId int64 `json:"client_id"` Expires int64 `json:"expires"` }
ACCESS TOKEN
func GetNewAccessToken ¶
func GetNewAccessToken(userId int64) AccessToken
func (*AccessToken) Generate ¶
func (at *AccessToken) Generate()
func (*AccessToken) IsExpired ¶
func (AT *AccessToken) IsExpired() bool
func (*AccessToken) Validate ¶
func (at *AccessToken) Validate() *errors.RestErr
type AccessTokenRequest ¶
type AccessTokenRequest struct { GrantType string `json:"grant_type"` Scope string `json:"scope"` //Used for password grant type UserName string `json:"username"` Password string `json:"password"` //Used for client credentials ClientId string `json:"client_id"` ClientSecret string `json:"client_secret"` }
ACCESS TOKEN REQUEST
func (*AccessTokenRequest) Validate ¶
func (atr *AccessTokenRequest) Validate() *errors.RestErr
Click to show internal directories.
Click to hide internal directories.