Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(jans-auth-server): tx token replace failing with 500 #8623

Closed
yuriyz opened this issue May 31, 2024 · 1 comment · Fixed by #8624
Closed

fix(jans-auth-server): tx token replace failing with 500 #8623

yuriyz opened this issue May 31, 2024 · 1 comment · Fixed by #8624
Assignees
Labels
comp-jans-auth-server Component affected by issue or PR kind-bug Issue or PR is a bug in existing functionality

Comments

@yuriyz
Copy link
Contributor

yuriyz commented May 31, 2024

Describe the bug

2024-05-31 14:24:14,635 ERROR [qtp1260134048-19] c4338390-9d37-4c62-88d5-aaa358f3d2f7 [as.server.token.ws.rs.TokenRestWebServiceImpl] (TokenRestWebServiceImpl.java:233) - A JS
ONObject text must begin with '{' at 1 [character 2 line 1]
org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]
        at org.json.JSONTokener.syntaxError(JSONTokener.java:503) ~[json-20231013.jar:?]
        at org.json.JSONObject.<init>(JSONObject.java:208) ~[json-20231013.jar:?]
        at org.json.JSONObject.<init>(JSONObject.java:402) ~[json-20231013.jar:?]
        at io.jans.as.server.token.ws.rs.TxTokenService.fillPayload(TxTokenService.java:166) ~[classes/:?]
        at io.jans.as.server.token.ws.rs.TxTokenService.createTxTokenJwr(TxTokenService.java:281) ~[classes/:?]
        at io.jans.as.server.token.ws.rs.TxTokenService.createTxToken(TxTokenService.java:132) ~[classes/:?]
        at io.jans.as.server.token.ws.rs.TxTokenService.process(TxTokenService.java:106) ~[classes/:?]
        at io.jans.as.server.token.ws.rs.TxTokenService.processTxToken(TxTokenService.java:91) ~[classes/:?]
        at io.jans.as.server.token.ws.rs.TokenRestWebServiceImpl.requestAccessToken(TokenRestWebServiceImpl.java:224) ~[classes/:?]
        at io.jans.as.server.token.ws.rs.TokenRestWebServiceImpl$Proxy$_$$_WeldClientProxy.requestAccessToken(Unknown Source) ~[classes/:?]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:1
POST /jans-auth/restv1/token HTTP/1.1
Content-Type: application/x-www-form-urlencoded

grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&audience=http%3A%2F%2Ftrusted2.com&subject_token=eyJraWQiOiJjb25uZWN0XzViODA2OWM3LWM5MDQtNDM4Mi1iNDNkLWVlNWJmMzBhNjQwYV9zaWdfcnMyNTYiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJyY3R4Ijp7InJlcV9pcCI6IjY5LjE1MS43Mi4xMjMifSwiYXVkIjpbIjgzYmM2NWYyLWIxNTUtNGQxNS1iODBkLWFiMWY0ZDlhMjQwZCIsImh0dHA6Ly90cnVzdGVkLmNvbSJdLCJzdWIiOiIiLCJwdXJwIjoidHhuX3Rva2VuIiwiaXNzIjoiaHR0cHM6Ly9qZW5raW5zLWJ1aWxkLmphbnMuaW8iLCJhemQiOnsiY2xpZW50X2lkIjoiODNiYzY1ZjItYjE1NS00ZDE1LWI4MGQtYWIxZjRkOWEyNDBkIn0sInR4biI6ImZiNzg2OWY5LTE1ZjgtNDhjNS05OWE0LWI3ZjQzOGUxYjJjNCIsImV4cCI6MTcxNzE0NjE0NiwiaWF0IjoxNzE3MTQ1OTY2fQ.he89X74L_STMxA34FCA3Kms9t1VVeleemHIMZFmYOmvti75b0h13nNM6AafKhfp1mFL4sK6ZvxgfZlRwCSmQTe0TTS1y-zyOZbSlcFpynzNakCn2a0avItjlInuQ09fiRq4nHK3B4SjHA_DHY2xiJT3QAiuSO-dbyFBhCudf0mp2ZB2fADyYscLBtu8lD4kiMlm1puh9lbyUlUCFdGcGeRyvq_iXBS3YyRuDPVIm6eQxdEVrKEP6qJEY1tai7k5GvliLdogks3ZJ2CvB8yYzMaGvnipfjhyHtRoSIlrNhmNZhU3vZ2VBH2aS4fUzxSEGe7VJkgzKh6Honvdt5X1SBg&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Atxn-token&request_context=%7B%22req_ip%22%3A%2269.151.72.100%22%7D

-------------------------------------------------------
RESPONSE:
-------------------------------------------------------
HTTP/1.1 500
Cache-Control: no-store
Connection: close
Content-Length: 0


@yuriyz yuriyz assigned moabu and yuriyz and unassigned moabu May 31, 2024
@mo-auto mo-auto added comp-jans-auth-server Component affected by issue or PR kind-bug Issue or PR is a bug in existing functionality labels May 31, 2024
yuriyz added a commit that referenced this issue May 31, 2024
Signed-off-by: YuriyZ <yzabrovarniy@gmail.com>
@yuriyz
Copy link
Contributor Author

yuriyz commented May 31, 2024

image

yuriyz added a commit that referenced this issue May 31, 2024
Signed-off-by: YuriyZ <yzabrovarniy@gmail.com>
moabu pushed a commit that referenced this issue Jun 6, 2024
Signed-off-by: YuriyZ <yzabrovarniy@gmail.com>
(cherry picked from commit 6061562)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-jans-auth-server Component affected by issue or PR kind-bug Issue or PR is a bug in existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants