Forum Discussion

myusername's avatar
myusername
New Contributor
4 years ago

using Groovy to retrieve "Access Token" from "Resource Owner Password Credentials Grant"

Hi,

 

i am able to retrieve an OpenID-token by using "Resource Owner Password Credentials Grant".

In the TestCase i would like to store the token using the code from https://support.smartbear.com/readyapi/docs/requests/auth/types/oauth2/tutorial.html

 

 

def authEntry = testRunner.testCase.getTestStepByName("getToken").getAuthRepository().getEntry("OpenID");

 

 

results in an error message

 

 

groovy.lang.MissingMethodException: No signature of method: com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep.getAuthRepository() is applicable for argument types: () values: []

 

 

 How can i retrieve the "Access Token"?

 

thanks

Robert