builder: use correct secret when fetching token

Use the `self.secret` and not `self.id` for the secret. Doh. Mea culpa.
Fix the corresponding test as well, which also checked for the wrong
thing.

Reported-By: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
Christian Kellner 2022-03-23 13:32:47 +01:00
parent 6f3c49139d
commit 9562deb983
2 changed files with 2 additions and 2 deletions

View file

@ -298,7 +298,7 @@ class OAuth2(requests.auth.AuthBase):
data = {
"grant_type": "client_credentials",
"client_id": self.id,
"client_secret": self.id
"client_secret": self.secret
}
res = http.post(self.token_url, data=data)