Skip to content

Commit

Permalink
Remove the Authorization comment
Browse files Browse the repository at this point in the history
  • Loading branch information
kavir1698 committed May 21, 2024
1 parent 25a59fc commit 48fe861
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions datasetUtils/getUserInfoFromToken.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@ func GetUserInfoFromToken(client *http.Client, APIServer string, token string) (
u := make(map[string]string)
accessGroups := make([]string, 0)

// url := APIServer + "/Users/userInfos" # uncomment if you use the Authorization header method
url := APIServer + "/Users/userInfos?access_token=" + token
req, err := http.NewRequest("GET", url, nil)
if err != nil {
return nil, nil, fmt.Errorf("failed to create request: %w", err)
}

req.Header.Set("Content-Type", "application/json")
// req.Header.Set("Authorization", "Bearer "+token) # NOTE: this is a more secure method, but I am not sure whether the server accepts tokens in the Authorization header.

resp, err := client.Do(req)
if err != nil {
Expand Down

0 comments on commit 48fe861

Please sign in to comment.