abuTX
4 years agoNew Contributor
username password not entering
username password not entering and leaves blank after entering in the field
- 8 years ago
Hi New2API,
To change the credentials you have set in the authorization profile (for the Client Credentials Grant type) you can use the following script in the Groovy Test Step:
import com.eviware.soapui.impl.rest.actions.oauth.OltuOAuth2ClientFacade import com.eviware.soapui.support.editor.inspectors.auth.TokenType def project = context.getTestCase().getTestSuite().getProject(); def oAuthProfile = project.getAuthRepository().getEntry("YourAuthProfile"); oAuthProfile.setClientSecret("Secret"); oAuthProfile.setClientID("Identification"); // the following code for getting new access token def oAuthClientFacade = new OltuOAuth2ClientFacade(TokenType.ACCESS); oAuthClientFacade.requestAccessToken(oAuthProfile, true);
- 8 years ago
Thank you for your interest.
It is progressive. You just need to keep practice, the necessity, interest, find new problems and try to solve them.
You may find below thread interesting :