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

Make the token available #111

Closed
maxbakke opened this issue Apr 4, 2019 · 2 comments
Closed

Make the token available #111

maxbakke opened this issue Apr 4, 2019 · 2 comments

Comments

@maxbakke
Copy link

maxbakke commented Apr 4, 2019

Is there a way to access the access token?
I am attempting to run clone commands and need to pass along the token.

Thanks!

@mnivet
Copy link
Collaborator

mnivet commented Apr 4, 2019

We have that but in current release it's only internal, not publicly exposed
see here: https://github.com/MitjaBezensek/SharpBucket/blob/master/SharpBucket/Authentication/OAuth2TokenProvider.cs

and we have a git clone usage in our unit tests.
See the usage of the token provider here:
https://github.com/MitjaBezensek/SharpBucket/blob/master/SharpBucketTests/GitHelpers/OAuth2GitCredentialsProvider.cs
And our git clone operation done with LibGit2Sharp in the constructor of that class:
https://github.com/MitjaBezensek/SharpBucket/blob/master/SharpBucketTests/GitHelpers/TestRepositoryBuilder.cs

I suppose we can easily expose to public the OAuth2TokenProvider if it match your needs
But for the OAuth2GitCredentialsProvider it won't be so simple. It depends on a git implementation (LibGit2Sharp) on which we don't want to take any dependency for the package we provide, and which may not be the one that you expect to use.
But if you use the same implementation, maybe we can though to provide a second package that provide that class. Or you can simply copy/past it in your own code, since creating a package for so little may not be relevant.

Take a look at those classes and tell me if just exposing the OAuth2TokenProvider to public would be good for you.

@mnivet mnivet changed the title Make the token awailable Make the token available Apr 29, 2019
@mnivet mnivet closed this as completed in f8be4cb Apr 30, 2019
@mnivet
Copy link
Collaborator

mnivet commented Apr 30, 2019

OAuth2TokenProvider has been improved and will be exposed to public in the next release

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

No branches or pull requests

2 participants