Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable OAuth2 authentication #36

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

frangelso
Copy link

Hello!

I work for Stack Overflow, and we've been requiring the usage of OAuth2 as an authentication method for this tap. So here is a PR with a simple, but effective, Bearer token manager implemented.
Tested locally with REST and AQUA calls and it's backwards compatible.

Please do reach out with any changes I might need to make and I do apologize in advance for any inconveniences.

Here are the changes I made:

  • Added logic to retrieve a Bearer token using the Username and Password fields as cliend_id and client_secret
  • Added logic to manage the existance of a Bearer token
  • Added checks to see which authorization method to use if OAuth2 is enabled
  • Added new error check while checking for existing exports that is required while using OAuth2

…ord fields as cliend_id and client_secret

- Added logic to manage the existance of a Bearer token
- Added checks to see which authorization method to use if OAuth2 is enabled
- Added new error check while checking for existing exports that is required while using OAuth2
- Reverted to the old usage of pendulum.utcnow()
@cmerrick
Copy link
Contributor

Hi @frangelso, thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes.

@cmerrick
Copy link
Contributor

You did it @frangelso!

Thank you for signing the Singer Contribution License Agreement.

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.

2 participants