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) {
5050 if code := info .GetCode (); code != "" {
5151 pipe .Set (code , jv , info .GetCodeExpiresIn ())
5252 } 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 ()
5459 aexp := info .GetAccessExpiresIn ()
5560 rexp := aexp
5661
@@ -59,10 +64,10 @@ func (rs *TokenStore) Create(info oauth2.TokenInfo) (err error) {
5964 if aexp .Seconds () > rexp .Seconds () {
6065 aexp = rexp
6166 }
62- pipe .Set (refresh , basicID , rexp )
67+ pipe .Set (refresh , basicIDStr , rexp )
6368 }
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 )
6671 }
6772
6873 if _ , verr := pipe .Exec (); verr != nil {
You can’t perform that action at this time.
0 commit comments