I am using jmeter for load testing of mobile application for login which is using Authorization Code Flow with PKCE.
In my Jmeter Script, I am generating code verifier and code challenge, nonce and state( nonce and state values are generating different) using JSR223 pre processor.
In script, initial stage I am launching the app with web address in mobile, during this one “/oauth2/auth” request recorded. I am passing the code challenge, nonce ans state in the request parameters of “/oauth2/auth” and request successfully getting executed.
Then I login with the user and password and got a proper response with login verifier.
Then after login, there is one more request of “/oauth2/auth” authoentication which have parameters : access id, client id,code challenge,code challenge method : S256,origin,login_verifier,nonce , state, scope , redirect uri: io.identityserver.xyz:/oauthredirect
I have passed the code challege, nonce and state value which I generated initially and also fetched login verifier from response of login and passed in request.
I don’t know where I am doing mistake. I should get the code in response but getting the below error :
java.net.MalformedURLException: unknown protocol: io.identityserver.xyz at java.net.URL.<init>(URL.java:617) at java.net.URL.<init>(URL.java:507) at org.apache.jmeter.protocol.http.util.ConversionUtils.makeRelativeURL(ConversionUtils.java:198) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.followRedirects(HTTPSamplerBase.java:1679) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.resultProcessing(HTTPSamplerBase.java:1776) at org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl.resultProcessing(HTTPAbstractImpl.java:554) at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:738) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:66) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1311) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1300) at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:651) at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:570) at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:501) at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:268) at java.lang.Thread.run(Thread.java:750)
I also checked headers, with auth request which are executing properly during launching web address in app and all headers are in proper position.
I used below logic to create code challenge :
[enter image description here](https://i.sstatic.net/winVx9bY.png)
Also used below logic to create nonce and state :
enter image description here
There should be get a proper authentication code in response.