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

feat(oxauth): jython script code does not recognize 3456 number #2

Open
yuriyz opened this issue Aug 1, 2024 · 1 comment
Open
Assignees
Milestone

Comments

@yuriyz
Copy link
Contributor

yuriyz commented Aug 1, 2024

Describe the issue

Following jython code does not recognize 3456 number.

jsonWebResponse.getClaims().setClaimObject("accountNumber3", Long.valueOf("3456"), True)

Steps To Reproduce

Run jython script with long number 3456

Expected behavior

Long number is recognized and json is produced {"accountNumber3": 3456}

Actual behavior

2024-08-01 12:14:10,442 ERROR [qtp1714078840-20] [org.gluu.oxauth.service.external.ExternalUpdateTokenService] (ExternalUpdateTokenService.java:56) - Claim value is not suppor
ted, key: accountNumber3, value :3456
java.lang.UnsupportedOperationException: Claim value is not supported, key: accountNumber3, value :3456
        at org.gluu.oxauth.model.jwt.JwtClaimSet.setClaimObject(JwtClaimSet.java:217) ~[oxauth-model-4.5.6-SNAPSHOT.jar:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
        at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:207) ~[jython-standalone-2.7.3.jar:2.7.4a1-SNAPSHOT]
        at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:225) ~[jython-standalone-2.7.3.jar:2.7.4a1-SNAPSHOT]
        at org.python.core.PyObject.__call__(PyObject.java:512) ~[jython-standalone-2.7.3.jar:2.7.4a1-SNAPSHOT]
        at org.python.core.PyObject.__call__(PyObject.java:517) ~[jython-standalone-2.7.3.jar:2.7.4a1-SNAPSHOT]

Support: 11888

@yuriyz yuriyz changed the title feat(oxauth): feat(oxauth): jython script code does not recognize 3456 number Aug 1, 2024
@yuriyz
Copy link
Contributor Author

yuriyz commented Aug 1, 2024

Issue can be workarounded with following code:

   parsed = JSONObject('{\"accountNumber\":7030934608, \"exp\":1722516607, \"iat\":1722513007}')
   jsonWebResponse.getClaims().load(parsed)

which results in correct json

{
  "accountNumber": 7030934608,
  "exp": 1722516607,
  "iat": 1722513007
}

@yuriyz yuriyz self-assigned this Aug 1, 2024
@yuriyz yuriyz transferred this issue from GluuFederation/oxAuth Oct 15, 2024
@moabu moabu added this to the 4.5.6 milestone Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants