Skip to content

Commit 65792f0

Browse files
committed
Modify comments
1 parent 850c354 commit 65792f0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

token.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import (
1010
"gopkg.in/oauth2.v3/models"
1111
)
1212

13-
// DefaultIncrKey TokenStore incr id
13+
// DefaultIncrKey The name of the key stored on the ID
1414
const DefaultIncrKey = "oauth2_incr"
1515

16-
// NewTokenStore Create a token TokenStore instance based on redis
16+
// NewTokenStore Create a token store instance based on redis
1717
func NewTokenStore(cfg *Config) (ts oauth2.TokenStore, err error) {
1818
opt := &redis.Options{
1919
Network: cfg.Network,
@@ -36,7 +36,7 @@ func NewTokenStore(cfg *Config) (ts oauth2.TokenStore, err error) {
3636
return
3737
}
3838

39-
// TokenStore Redis Token Store
39+
// TokenStore redis token store
4040
type TokenStore struct {
4141
cli *redis.Client
4242
}
@@ -45,7 +45,7 @@ func (rs *TokenStore) getBasicID(id int64, info oauth2.TokenInfo) string {
4545
return "oauth2_" + info.GetClientID() + "_" + strconv.FormatInt(id, 10)
4646
}
4747

48-
// Create Create and TokenStore the new token information
48+
// Create Create and store the new token information
4949
func (rs *TokenStore) Create(info oauth2.TokenInfo) (err error) {
5050
jv, err := json.Marshal(info)
5151
if err != nil {
@@ -93,7 +93,7 @@ func (rs *TokenStore) remove(key string) (err error) {
9393
return
9494
}
9595

96-
// RemoveByAccess Use the access token to delete the token information(Along with the refresh token)
96+
// RemoveByAccess Use the access token to delete the token information
9797
func (rs *TokenStore) RemoveByAccess(access string) (err error) {
9898
err = rs.remove(access)
9999
return

0 commit comments

Comments
 (0)