加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
store.go 943 Bytes
一键复制 编辑 原始数据 按行查看 历史
Lyric 提交于 2016-08-05 14:56 . update comments
package oauth2
type (
// ClientStore the client information storage interface
ClientStore interface {
// according to the ID for the client information
GetByID(id string) (ClientInfo, error)
}
// TokenStore the token information storage interface
TokenStore interface {
// create and store the new token information
Create(info TokenInfo) error
// delete the authorization code
RemoveByCode(code string) error
// use the access token to delete the token information
RemoveByAccess(access string) error
// use the refresh token to delete the token information
RemoveByRefresh(refresh string) error
// use the authorization code for token information data
GetByCode(code string) (TokenInfo, error)
// use the access token for token information data
GetByAccess(access string) (TokenInfo, error)
// use the refresh token for token information data
GetByRefresh(refresh string) (TokenInfo, error)
}
)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化