cancel
Showing results for 
Search instead for 
Did you mean: 

Problem Implementing 0Auth 2.0 Authentication through Javascript Language

New Contributor

Problem Implementing 0Auth 2.0 Authentication through Javascript Language

Hi . I am working on complex calculation project in Ready APi which has scripting language as"javaScript". We would need to implement Authentication in the Composite Project. Could anyone share the script to retrieve the token automatically through Javascript. I am able to retrieve the details automatically through Groovy but i wont be  able to change the project language to groovy as it has more complex language which was implemented using Javascript. It would take more effort to change the language for this issue.

 

Problem Statement: Need support for oAuth 2.0 Implementation using Javascript. Retrieving token automatically.

 

So Please anyone share the code to retrieve the token automatically.

7 REPLIES 7
Highlighted
Community Hero

Re: Problem Implementing 0Auth 2.0 Authentication through Javascript Language

HI @SajithaVasu 

 

I've been looking at OAuth quite recently myself and I'm struggling!

 

Anyway - this is not the perfect answer you want - but perhaps it can get you further than I did.

 

The following link 'Oauth Automation Example' has some JavaScript and groovy to do different parts of what you need.

 

The groovy bit is the 'calling the automated retrieval' bit -  there are groovy to javascript converters (no doubt not perfect - but it might get you a little further) - see githublink - this would still need some work on your side I suspect - but it might get you close to what you need?

 

sorry I cant be of more help,

 

richie

 

 

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the title of the post to something more descriptive? This will help people when searching for problems.
Moderator

Re: Problem Implementing 0Auth 2.0 Authentication through Javascript Language

Hi all,

 

@richie, thank you for the reply!

@SajithaVasu did this help you? Have you managed to find a solution?

 


Olga Terentieva
SmartBear Assistant Community Manager

New Contributor

Re: Problem Implementing 0Auth 2.0 Authentication through Javascript Language

I am still have the same problem. I am unable to convert the groovy code to Javascript. Problem exists. need a solution to implement authentication using Javascript 

Moderator

Re: Problem Implementing 0Auth 2.0 Authentication through Javascript Language

@SajithaVasu , let's try to refer to our Community experts.

@nmrao , @Radford , @avidCoder , @Lucian , @msiadak , maybe do you have any ideas on how to implement this?

Your assistance is much appreciated. Thank you in advance!

 


Olga Terentieva
SmartBear Assistant Community Manager

Community Hero

Re: Problem Implementing 0Auth 2.0 Authentication through Javascript Language

I'll admit I haven't had much occasion to tinker with 0Auth 2.0 Authentication, so I am unfamiliar with that particular topic. I'll see if I can find some information that might be useful though!




---

Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
Super Contributor

Re: Problem Implementing 0Auth 2.0 Authentication through Javascript Language

I can help to implement OAuth 2.0 authentication through Java language. I have done this before but I am not sure about JavaScript. And Ready API has feature for Oauth 2.0, from where you can directly use that without adding any oauth code. 

https://support.smartbear.com/readyapi/docs/projects/requests/auth/types/oauth2/tutorial.html

 

Though, I have never used this feature. But, you can give it a try.

Moderator

Re: Problem Implementing 0Auth 2.0 Authentication through Javascript Language

@avidCoder@msiadak, thank you so much for your answers!

 

@SajithaVasu, what stage are you on now? Have you managed to achieve the goal yourself, or do you need any further assistance from our experts?

We are looking forward to hearing from you.

 


Olga Terentieva
SmartBear Assistant Community Manager

New Here?
Join us and watch the welcome video:
API Testing Mistake #2
APITestingMistake#2