App Connect

 View Only
  • 1.  Generating JWT Bearer token in ACE ESQL

    IBM Champion
    Posted 21 days ago

    Hi,

    I have a requirement to generate JWT Bearer token from Certificate ID. Is there any built in function available in ESQL to generate JWT Bearer token, or what is the recommended way to use in ACE?

    Note: The access token shared by the external application expires in 2 hours. Hence every time if I need to get the access token, I have to regenerate the JWT Bearer token in ACE and get the corresponding access token from the external application.

    Thanks,

    Santhosh Ramanathan



    ------------------------------
    Thanks,
    Santhosh Ramanathan
    ------------------------------


  • 2.  RE: Generating JWT Bearer token in ACE ESQL

    Posted 11 days ago

    Hi Santhosh,

    I'm not sure that there is ESQL built in function. I always use a java compute and import the nimbus library.

    https://connect2id.com/products/nimbus-jose-jwt

    Perhaps this can help you.



    ------------------------------
    kim meynendonckx
    ------------------------------



  • 3.  RE: Generating JWT Bearer token in ACE ESQL

    IBM Champion
    Posted 3 days ago

    Hi Kim,

    Thanks for the link. Can you please advise how to use this library for Signing using PS256 algorithm

    Thanks,

    Santhosh Ramanathan



    ------------------------------
    Thanks,
    Santhosh Ramanathan
    ------------------------------



  • 4.  RE: Generating JWT Bearer token in ACE ESQL

    Posted 13 hours ago

    Hi Santosh,

    In the examples you can find an example to generate a JWT with the PS256.

    https://connect2id.com/products/nimbus-jose-jwt/examples/jwt-with-rsa-signature

    The example code generates a private/public key-pair. But I assume you already have created a pair.
    So you need to import your keystore instead of generating one in code.
    You also need to update the claimset with the ones that are required in your use-case.

    It's a good idea to put your token in a GlobalMap for the time that the token is active for reuse.

    Don't forget to put the nimbus jar into your shared-classes, otherwise the deployment won't work.



    ------------------------------
    kim meynendonckx
    ------------------------------