cancel
Showing results for 
Search instead for 
Did you mean: 

constant com.eviware.soapui.impl.rest.actions.oauth.OAuth2Parameters.PKCEChallengeMethod.Not defined

SOLVED
davecoleman
Contributor

constant com.eviware.soapui.impl.rest.actions.oauth.OAuth2Parameters.PKCEChallengeMethod.Not defined

hi all,

I can manually request a token in my Project. if I however use "Inherit from Parent" where I have the Event SubmitListener declared below, I get the following error when a request is sent:

Wed Mar 10 14:47:52 GMT 2021: DEBUG: No enum constant com.eviware.soapui.impl.rest.actions.oauth.OAuth2Parameters.PKCEChallengeMethod.Not defined

The script is below. Any ideas on why this occurs? 

 

// Import the required classes
import com.eviware.soapui.impl.rest.actions.oauth.OltuOAuth2ClientFacade;
import com.eviware.soapui.support.editor.inspectors.auth.TokenType;
import com.eviware.soapui.model.support.ModelSupport;

// Set up variables
def project = ModelSupport.getModelItemProject(context.getModelItem());
def authProfile = project.getAuthRepository().getEntry("UAT1");
def oldToken = authProfile.getAccessToken();
def tokenType = TokenType.ACCESS;

// Create a facade object
def oAuthFacade = new OltuOAuth2ClientFacade(tokenType);

// Request an access token in headless mode
oAuthFacade.requestAccessToken(authProfile, true, true);

// Wait until the access token gets updated
//while(oldToken == authProfile.getAccessToken()) {}
//The sleep method can be used instead of a while loop
//sleep(3000);
for(int i = 0; i<=3000; i++){
        if(oldToken != authProfile.getAccessToken()){
            break
        }
        sleep(1)
    }

asd

1 ACCEPTED SOLUTION

Accepted Solutions
sonya_m
Community Manager

Re: constant com.eviware.soapui.impl.rest.actions.oauth.OAuth2Parameters.PKCEChallengeMethod.Not def

Hi @davecoleman , judging by Rao's reply, the error is not connected with the script. Have you tried looking for other possible reasons?

Also, I will recommend support for deeper investigation.


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

4 REPLIES 4
sonya_m
Community Manager

Re: constant com.eviware.soapui.impl.rest.actions.oauth.OAuth2Parameters.PKCEChallengeMethod.Not def

Thank you for the question!

 

Community, any thoughts on why this is happening? @msiadak @nmrao @PrathapR 


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
nmrao
Community Hero

Re: constant com.eviware.soapui.impl.rest.actions.oauth.OAuth2Parameters.PKCEChallengeMethod.Not def

Based the script, there is no such line in the script which can lead to mentioned error.


Regards,
Rao.
sonya_m
Community Manager

Re: constant com.eviware.soapui.impl.rest.actions.oauth.OAuth2Parameters.PKCEChallengeMethod.Not def

Hi @davecoleman , judging by Rao's reply, the error is not connected with the script. Have you tried looking for other possible reasons?

Also, I will recommend support for deeper investigation.


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

areddappa
Regular Visitor

Re: constant com.eviware.soapui.impl.rest.actions.oauth.OAuth2Parameters.PKCEChallengeMethod.Not def

Hello, I am getting the same error, but token is getting updated, how did you solve the issue?

  • Tue Apr 27 13:35:29 AEST 2021: DEBUG: No enum constant com.eviware.soapui.impl.rest.actions.oauth.OAuth2Parameters.PKCEChallengeMethod.Not defined

Is the error related to the new field added in the dialog box. Enable PKCE? 

areddappa_1-1619494783478.png

 

 

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors