OAuth authentication for stash

naresh kumar May 29, 2014

Is there a way to get Oauth tokens for stash manually apart from basic authentication? During basic authentication provided in you documentation I am getting sessionId and other parameters. Can I use sessionId for further communication with snippet plugin of stash?

1 answer

0 votes
Remo Siegwart
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 29, 2014

The Snippets for Stash plugin supports the same authentication as the core REST API of Stash or Stash itself. From the documentation:

Any authentication that works against Stash will work against the REST API. The prefered authentication methods are HTTP Basic (when using SSL) and OAuth. Other supported methods include: HTTP Cookies and Trusted Applications.

You can find OAuth code samples in several programming languages at bitbucket.org/atlassian_tutorial/atlassian-oauth-examples.

Hope this helps

naresh kumar June 2, 2014

How can i use JsessionId to connect to snippets for my further communications? I tried including it in URL but no use. Can you show a sample of using JsessionId for communication with plugins.

Remo Siegwart
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 2, 2014

Did you try to add it as a cookie in the header of the request?

bitvoodoo ag June 2, 2014

Did you try to add it as a cookie in the header of the request?

naresh kumar June 3, 2014

i tried adding header "Set-Cookie" but it didn't work. Anyways i was able to do oauth authentication with stash using python script. Thanks for the help

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events