Undo changes to validation
parent
6d6d4baf82
commit
20bace6e9a
|
@ -34,6 +34,7 @@ func checkAccess(token string) (bool, error) {
|
|||
return false, errors.New("token string is empty")
|
||||
}
|
||||
// form the request to check the token
|
||||
client := &http.Client{}
|
||||
req, err := http.NewRequest("GET", indieAuthTokenUrl, nil)
|
||||
if err != nil {
|
||||
return false, errors.New("error making the request for checking token access")
|
||||
|
@ -41,7 +42,7 @@ func checkAccess(token string) (bool, error) {
|
|||
req.Header.Set("Accept", "application/json")
|
||||
req.Header.Set("Authorization", token)
|
||||
// send the request
|
||||
res, err := http.Client{}.Do(req)
|
||||
res, err := client.Do(req)
|
||||
if err != nil {
|
||||
return false, errors.New("error sending the request for checking token access")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue