Skip to content

Conversation

@prajwaltr93
Copy link
Contributor

@prajwaltr93 prajwaltr93 commented Mar 25, 2023

when using OAUTH2 as STORAGE_API with use of credentials such as client_id, client_secret etc, access_token is first fetched and further requests use fetched token to perform request until it expires.

regex used to parse response and get access_token had an extra trailing space, which is not present in response causing amanda to not parse it hence sending empty access_token i.e Authorization : Bearer (null).

this fixes parsing, further enables users using OAUTH2 as authentication mechanism.

fixes #214.

Changes:

  • Fix regex's parsing response to get valid set of credentials

  • Testing Changes.

  • account of no or more trailing space in regex's

  • make setting HTTP requests to 1.1 if user wishes to, by allowing settings another configuration in .conf

@prajwaltr93 prajwaltr93 force-pushed the 3_5.fix_access_token_oauth2 branch from f0bc5c9 to 3b45e9f Compare March 25, 2023 03:17
@prajwaltr93 prajwaltr93 force-pushed the 3_5.fix_access_token_oauth2 branch 2 times, most recently from 6c998e9 to 2daf8bb Compare March 25, 2023 03:28
- was not setting expires_in properly, causing fetch of access_token
for every other request

TODO: make use of HTTP/1.1 configurable
@prajwaltr93 prajwaltr93 force-pushed the 3_5.fix_access_token_oauth2 branch from 0563c62 to ca0e02a Compare May 22, 2023 05:42
@prajwaltr93 prajwaltr93 changed the title Draft: Fix parsing of access_token key from response JSON for OAUTH2 Fix parsing of access_token key from response JSON for OAUTH2 May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant