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

Use Authorization header for Github PAT #32

Merged
merged 1 commit into from
Aug 20, 2020

Conversation

michaelbeaumont
Copy link
Contributor

PATs are oauth tokens so there's no reason to use BasicAuth here.

I read the GH docs as recommending Authorization: Bearer if possible.

GH understands what kind of token is being used, e.g. I see:
Added on Aug 20, 2020 via personal access token owned by @michaelbeaumont
when I authenticate this way and add a DeployKey

I left the interface as is but WithPersonalAccessToken could also just be removed.

@luxas
Copy link
Collaborator

luxas commented Aug 20, 2020

Thanks for catching this! Then, please clean everything up that's referencing PersonalAccessToken 🙏 👏

PATs are oauth tokens so there's no reason to use BasicAuth here.

I read the GH docs as recommending `Authorization: Bearer` if possible.

GH understands what kind of token is being used, e.g. I see:
`Added on Aug 20, 2020 via personal access token owned by
@michaelbeaumont`
when I authenticate this way and add a DeployKey
@michaelbeaumont
Copy link
Contributor Author

Done!

@luxas luxas self-assigned this Aug 20, 2020
@luxas luxas added this to the v0.0.2 milestone Aug 20, 2020
Copy link
Collaborator

@luxas luxas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, LGTM 👍

@luxas luxas merged commit 8c114ec into fluxcd:master Aug 20, 2020
@michaelbeaumont michaelbeaumont deleted the gh_auth branch August 20, 2020 16:53
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