Documentation ¶
Index ¶
- type Client
- type Token
- func (t *Token) GetAccess() string
- func (t *Token) GetAccessCreateAt() time.Time
- func (t *Token) GetAccessExpiresIn() time.Duration
- func (t *Token) GetClientID() string
- func (t *Token) GetCode() string
- func (t *Token) GetCodeChallenge() string
- func (t *Token) GetCodeChallengeMethod() oauth2.CodeChallengeMethod
- func (t *Token) GetCodeCreateAt() time.Time
- func (t *Token) GetCodeExpiresIn() time.Duration
- func (t *Token) GetRedirectURI() string
- func (t *Token) GetRefresh() string
- func (t *Token) GetRefreshCreateAt() time.Time
- func (t *Token) GetRefreshExpiresIn() time.Duration
- func (t *Token) GetScope() string
- func (t *Token) GetUserID() string
- func (t *Token) New() oauth2.TokenInfo
- func (t *Token) SetAccess(access string)
- func (t *Token) SetAccessCreateAt(createAt time.Time)
- func (t *Token) SetAccessExpiresIn(exp time.Duration)
- func (t *Token) SetClientID(clientID string)
- func (t *Token) SetCode(code string)
- func (t *Token) SetCodeChallenge(code string)
- func (t *Token) SetCodeChallengeMethod(method oauth2.CodeChallengeMethod)
- func (t *Token) SetCodeCreateAt(createAt time.Time)
- func (t *Token) SetCodeExpiresIn(exp time.Duration)
- func (t *Token) SetRedirectURI(redirectURI string)
- func (t *Token) SetRefresh(refresh string)
- func (t *Token) SetRefreshCreateAt(createAt time.Time)
- func (t *Token) SetRefreshExpiresIn(exp time.Duration)
- func (t *Token) SetScope(scope string)
- func (t *Token) SetUserID(userID string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Token ¶
type Token struct { ClientID string `bson:"ClientID"` UserID string `bson:"UserID"` RedirectURI string `bson:"RedirectURI"` Scope string `bson:"Scope"` Code string `bson:"Code"` CodeChallenge string `bson:"CodeChallenge"` CodeChallengeMethod string `bson:"CodeChallengeMethod"` CodeCreateAt time.Time `bson:"CodeCreateAt"` CodeExpiresIn time.Duration `bson:"CodeExpiresIn"` Access string `bson:"Access"` AccessCreateAt time.Time `bson:"AccessCreateAt"` AccessExpiresIn time.Duration `bson:"AccessExpiresIn"` Refresh string `bson:"Refresh"` RefreshCreateAt time.Time `bson:"RefreshCreateAt"` RefreshExpiresIn time.Duration `bson:"RefreshExpiresIn"` }
Token token model
func (*Token) GetAccessCreateAt ¶
GetAccessCreateAt create Time
func (*Token) GetAccessExpiresIn ¶
GetAccessExpiresIn the lifetime in seconds of the access token
func (*Token) GetCodeChallenge ¶
GetCodeChallenge challenge code
func (*Token) GetCodeChallengeMethod ¶
func (t *Token) GetCodeChallengeMethod() oauth2.CodeChallengeMethod
GetCodeChallengeMethod challenge method
func (*Token) GetCodeCreateAt ¶
GetCodeCreateAt create Time
func (*Token) GetCodeExpiresIn ¶
GetCodeExpiresIn the lifetime in seconds of the authorization code
func (*Token) GetRefreshCreateAt ¶
GetRefreshCreateAt create Time
func (*Token) GetRefreshExpiresIn ¶
GetRefreshExpiresIn the lifetime in seconds of the refresh token
func (*Token) SetAccessCreateAt ¶
SetAccessCreateAt create Time
func (*Token) SetAccessExpiresIn ¶
SetAccessExpiresIn the lifetime in seconds of the access token
func (*Token) SetCodeChallenge ¶
SetCodeChallenge challenge code
func (*Token) SetCodeChallengeMethod ¶
func (t *Token) SetCodeChallengeMethod(method oauth2.CodeChallengeMethod)
SetCodeChallengeMethod challenge method
func (*Token) SetCodeCreateAt ¶
SetCodeCreateAt create Time
func (*Token) SetCodeExpiresIn ¶
SetCodeExpiresIn the lifetime in seconds of the authorization code
func (*Token) SetRedirectURI ¶
SetRedirectURI redirect URI
func (*Token) SetRefreshCreateAt ¶
SetRefreshCreateAt create Time
func (*Token) SetRefreshExpiresIn ¶
SetRefreshExpiresIn the lifetime in seconds of the refresh token