mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: fix low hanging lint issues (#9253)
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"encoding/pem"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
@@ -243,7 +242,7 @@ func (src *jwtTokenSource) Token() (*oauth2.Token, error) {
|
||||
}
|
||||
|
||||
if unmarshalError != nil {
|
||||
return nil, fmt.Errorf("oauth2: cannot unmarshal token: %w", err)
|
||||
return nil, xerrors.Errorf("oauth2: cannot unmarshal token: %w", err)
|
||||
}
|
||||
|
||||
newToken := &oauth2.Token{
|
||||
@@ -264,7 +263,7 @@ func (src *jwtTokenSource) Token() (*oauth2.Token, error) {
|
||||
// decode returned id token to get expiry
|
||||
claimSet, err := jws.Decode(v)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("oauth2: error decoding JWT token: %w", err)
|
||||
return nil, xerrors.Errorf("oauth2: error decoding JWT token: %w", err)
|
||||
}
|
||||
newToken.Expiry = time.Unix(claimSet.Exp, 0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user