Documentation
¶
Index ¶
Constants ¶
View Source
const ( TokenTypeBearer = "bearer" GrantTypeClientCredentials = "client_credentials" GrantTypeRefreshToken = "refresh_token" GrantTypePassword = "password" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type AccessToken struct { Token string `json:"token"` DateCreated string `json:"date_created"` Expires int64 `json:"expires"` DateRevoked string `json:"date_revoked,omitempty"` }
func GetNewAccessToken ¶ added in v1.7.0
func GetNewAccessToken() *AccessToken
func (AccessToken) IsExpired ¶
func (at AccessToken) IsExpired() bool
func (*AccessToken) UpdateExpirationTime ¶
func (at *AccessToken) UpdateExpirationTime()
func (*AccessToken) Validate ¶
func (at *AccessToken) Validate() *rest_errors.RestErr
type AccessTokenRequest ¶
type AccessTokenRequest struct { TokenType string `json:"token_type"` GrantType string `json:"grant_type"` Scope string `json:"scope"` // User for password grant type Username string `json:"username"` Password string `json:"password"` // User for client_credentials_repo grant type ClientId string `json:"client_id"` ClientSecret string `json:"client_secret"` // User for refresh_token grant type AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` }
func (*AccessTokenRequest) Validate ¶
func (request *AccessTokenRequest) Validate() *rest_errors.RestErr
Click to show internal directories.
Click to hide internal directories.