Hi. I currently try to implement a "Login with Stash" button into VersionEye Enterprise. If somebody logs in with his Stash Account into VersionEye Enterprise, I need at least his name and his email address from the Stash API to create the user in VersionEye Enterprise.
The OAuth Authentication works so far. I get a valid token & secret and I can make authenticated request against the Stash REST API. But what is the Endpoint to retrieve the current user object to the OAuth token? On the Bitbucket API it is "/api/1.0/user". I couldn't find something similar in this documentation: https://developer.atlassian.com/static/rest/stash/3.3.1/stash-rest.html.
In this example here they show how it works for JIRA. They use these endpoint "/rest/auth/latest/session". But that doesn't work for Stash.
Please help. Feedback is appreciated.
Community moderators have prevented the ability to post new answers.
Hi Robert,
There isn't currently a end-point that returns the profile of the currently authenticated Stash user. However you can retrieve the name of the currently authenticated user from the whoami
end-point that I described in this answer and then use that to retrieve the current user's profile.
cheers,
Tim
Hi Tim. Many Thanks for the fast response. That worked out. "Login with Stash" button works like charm ;-) The other Endpoints to fetch repos, branches and files are quiet good documented. It all worked like expected.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great to hear it! I'll have to have a play with VersionEye - looks very cool. Now that you're up & running, would you mind marking this answer as accepted?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tim. I just upvoted your answer. For me your answer is marked as accepted. At least I see the green bubble :-) VersionEye Enterprise is currently in private Beta. But I will open it soon for a wider audience. Most of the B2B clients have either GitHub Enterprise or Stash as SCM. That's why the Stash integration was very important to me. Now it works like charm. Thanks for the great support.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.