Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to change Rest API Basic Authentication to OAuth 2 Authentication (groovy Script code)

GG
Contributor
May 28, 2023

Hi,

I have a REST API(Post) with basic authentication written in Groovy code.How to convert it to OAuth 2 authentication. How should I change the Groovy code? Is there an example?

 

Regards

GG

2 answers

0 votes
GG
Contributor
May 30, 2023

Thanks for your response.

Is it possible only through the application link? Both software should be HTTPS?

Can not be done by changing the existing Groovy Script?

 

Regards

GG

0 votes
Ivan Lima
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 28, 2023

Hey @GG, you could create a generic application link with OAuth in Jira to make REST requests using ScriptRunner. For examples and more details on how to set that up, see  https://docs.adaptavist.com/sr4js/latest/integrations/atlassian-products/via-app-links.

Suggest an answer

Log in or Sign up to answer