Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] Usagefororg.eclipse.orion.server.git.IGitHubTokenProvider

Hi Danushka,
 
The place where Orion queries registered IGitHubTokenProviders for a token is GitCredentialsProvider.get() ; if it gets a token then it sets the value on the jgit CredentialItem.Username.  If this path would satisfy a GitBlit installation as well then you should be able to reuse the IGitHubTokenProvider hook.  I haven't used GitBlit before, but http://gitblit.com/faq.html#H23 seems to indicate that you could implement a user service on that side to map a received token (that you've previously issued) to a user.  If this works then you'd also need to implement a user authorization page to issue the token in the first place (your IGitHubTokenProvider.getAuthUrl() impl. would return this page's url).  Based on this it appears that what you're asking is doable, it will likely just need work on both the Orion and GitBlit sides.
 
Grant
 
 
----- Original message -----
From: Danushka Fernando <wdfdo1986@xxxxxxxxx>
Sent by: orion-dev-bounces@xxxxxxxxxxx
To: Orion developer discussions <orion-dev@xxxxxxxxxxx>
Cc:
Subject: Re: [orion-dev] Usage fororg.eclipse.orion.server.git.IGitHubTokenProvider
Date: Thu, Feb 18, 2016 12:02 AM
 
Thanks Grant for explanation. By going through the code code I understood a part of it. So thanks for clarifying the full story. In our case its not a GitHub. We are using a GitBlit installation. So I guess we can use it for all git enterprise installations to have their own authentication mechanism. WDYT? 
 
On Thu, Feb 18, 2016 at 4:25 AM, Grant Gayed <Grant_Gayed@xxxxxxxxxx> wrote:
Hi Danushka,
 
IGitHubTokenProvider implementations get referenced for GitHub repo operations that require user authentication (target could be github.com or a GitHub Enterprise installation).  Implementing and registering one of these gives the opportunity to provide a GitHub-issued token to authenticate the user rather than Orion's default username/password prompter when attempting a push, fetch or clone-of-private-repo.
 
- getToken() returns the token for the user if it's already known from some previous interaction
- getAuthUrl() returns the url where the user can give their authorization and have one of these tokens issued
 
GitCredentialsProvider.AddGitHubTokenProvider() is the place to add implementations of this.
 
HTH,
Grant
 
 
----- Original message -----
From: Danushka Fernando <wdfdo1986@xxxxxxxxx>
Sent by: orion-dev-bounces@xxxxxxxxxxx
To: Orion developer discussions <orion-dev@xxxxxxxxxxx>
Cc:
Subject: [orion-dev] Usage for org.eclipse.orion.server.git.IGitHubTokenProvider
Date: Tue, Feb 16, 2016 11:12 PM
 
Hi devs
I am trying to understand $subject. Can some one shed some light here.
Is this to clone github code with oauth authorization?
Can we do this with non github git repos?
Can we pass details as url parameters?
Can we add new implementations of this class?
Is there a configuration or properties file in the server?
 
--
Best Regards
Danushka Fernando.
Senior Software Engineer,
WSO2.
_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/orion-dev
 


_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/orion-dev
 
 
--
Best Regards
Danushka Fernando.
Senior Software Engineer,
WSO2.
_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/orion-dev
 


Back to the top