File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,12 @@ func (rs *TokenStore) Create(info oauth2.TokenInfo) (err error) {
50
50
if code := info .GetCode (); code != "" {
51
51
pipe .Set (code , jv , info .GetCodeExpiresIn ())
52
52
} else {
53
- basicID := uuid .NewV4 ().String ()
53
+ basicID , uerr := uuid .NewV4 ()
54
+ if uerr != nil {
55
+ err = uerr
56
+ return
57
+ }
58
+ basicIDStr := basicID .String ()
54
59
aexp := info .GetAccessExpiresIn ()
55
60
rexp := aexp
56
61
@@ -59,10 +64,10 @@ func (rs *TokenStore) Create(info oauth2.TokenInfo) (err error) {
59
64
if aexp .Seconds () > rexp .Seconds () {
60
65
aexp = rexp
61
66
}
62
- pipe .Set (refresh , basicID , rexp )
67
+ pipe .Set (refresh , basicIDStr , rexp )
63
68
}
64
- pipe .Set (info .GetAccess (), basicID , aexp )
65
- pipe .Set (basicID , jv , rexp )
69
+ pipe .Set (info .GetAccess (), basicIDStr , aexp )
70
+ pipe .Set (basicIDStr , jv , rexp )
66
71
}
67
72
68
73
if _ , verr := pipe .Exec (); verr != nil {
You can’t perform that action at this time.
0 commit comments