This one’s another quick Zkybase screenshot post. Using Spring Social GitHub, it’s easy to access public user and repo information via the GitHubTemplate. But if we want to access private information, or write capabilities, we need to use the Spring Social connection framework. This involves adding a Spring Social web controller to the app, giving users a way to log into Zkybase itself (via Spring Security), and then finally giving them a way to connect their Zkybase account to their GitHub account via OAuth 2.
Here’s what the GitHub section of the account page looks like before you connect to GitHub:
Once you’ve done that, the display changes to the following:
And now we can perform various secure operations on our GitHub objects, like viewing repo hooks:
I plan to use this integration to support autoprovisioning continuous integration servers, among other things.
If you’re interested in the code itself, please see my blog post entitled Using Spring Social GitHub to access secured GitHub data [code].