Turn the integration logger to debug and look at the logs. We output a lot of useful debug information such as the access token we retrieved, what value we have for the expires_in, etc.
I would then open a support case. Based on your version, you're correct that the line is where we try to set expiryinsec. If that's not coming from the OAuth response we need to handle that better to avoid the null pointer.
Original Message:
Sent: Wed March 08, 2023 05:12 PM
From: Rajesh Vijayakumar
Subject: Connecting Maximo to OAUTH2 EndPoint
Can you please check the below Token URL? What would the redirect_uri for Maximo? I have provided a valid ClientID/Client Secret and grant type = "client_credentials"
Token URL: https://xxxx.az.gov/portal/sharing/rest/oauth2/authorize?redirect_uri=http://maximo24:9080/maximo/ui&expiration=20160.
Getting the below error when I Test the End Point... Seems to be missing.expiryinsec
java.lang.NullPointerException
at psdi.iface.router.OAUTHClient.updateClient(OAUTHClient.java:158)
at psdi.iface.router.OAUTHClient.getAccessToken(OAUTHClient.java:136)
at psdi.iface.router.HTTPHandler.invoke(HTTPHandler.java:298)
at psdi.iface.mic.MicService.routeData(MicService.java:284)
at psdi.iface.app.endpoint.MaxEndPointTestSet.execute(MaxEndPointTestSet.java:161)
at psdi.webclient.beans.endpoint.EndPointTestBean.testxml(EndPointTestBean.java:59)
at sun.reflect.GeneratedMethodAccessor348.invoke(Unknown Source)
------------------------------
Rajesh Vijayakumar
Original Message:
Sent: Thu March 02, 2023 09:37 AM
From: Steven Shull
Subject: Connecting Maximo to OAUTH2 EndPoint
Step #1 is to create the OAUTH client. You can use the Add/Modify Clients or send it via REST API (documented here: https://www.ibm.com/docs/en/maximo-manage/continuous-delivery?topic=handlers-configuring-oauth-access)
Step #2 is to set the OAUTHCLIENT field property on the end point based on what you created above. Then the Maximo integration framework should manage it for you. You should not need to do anything special to override the headers at that point.
------------------------------
Steven Shull
Original Message:
Sent: Wed March 01, 2023 06:35 PM
From: Rajesh Vijayakumar
Subject: Connecting Maximo to OAUTH2 EndPoint
Hi Steven,
We are in 7.6.1.3 and trying to integrate via OAuth 2.0. I have created the End Point and populated URL, username, password and HPPTEXIT. Should I populate OATHCLIENT? Also, should I create a new OATH Clients record via End Point --> Select action Add/Modify Clients?
My initial thought was to create an automation script for the Publish Channel for UserExit and somehow override the URL or Add Headers via the IntegrationContext.getCurrentContext() or via EndPointCache.getInstance().getEndPointInfo("ENDPOINTNAME").getProperty("URL").
Thank you,
Rajesh Vijayakumar
------------------------------
Rajesh Vijayakumar
Original Message:
Sent: Thu October 06, 2022 10:07 AM
From: Steven Shull
Subject: Connecting Maximo to OAUTH2 EndPoint
If you're able to get to 7.6.1.3 or are on MAS, just be aware that we added support for OAuth 2.0 to our endpoints out of the box. I wouldn't recommend writing your own method for generating refresh tokens once you get to these versions.
------------------------------
Steven Shull
Original Message:
Sent: Tue October 04, 2022 03:13 AM
From: Mahmoud AbdElhakiem
Subject: Connecting Maximo to OAUTH2 EndPoint
Hello Kushal,
Could you share the automation script that generate API key, please?
------------------------------
Mahmoud AbdElhakiem
Original Message:
Sent: Sat December 26, 2020 11:04 PM
From: Kushal Desai
Subject: Connecting Maximo to OAUTH2 EndPoint
Hello Experts,
I have a requirement to connect Maximo with an HTTP endpoint that uses a token-based authorization method using OAUTH2. Although Maximo does not support OAUTH2 authorization yet, I developed an automation script that generates the API key (using client credentials, client secret) and updates the header in HTTP Endpoint. The solution was working very well until recently the HTTP endpoint is now configured in Google APIGEE.
After the change, my current script is unable to generate the API key.
Since this is an additional library not embedded in Maximo, I am looking for a solution to import this package in Maximo EAR and make it available for use in Automation Script.
My question is how do I import python libraries in the Maximo server and enable it?
I am using Maximo 7.6.1.1 with a Transportation add-on.
Thanks
Kushal Desai
Technical Architect
| Python HTTP for Humans. Help the Python Software Foundation raise $60,000 USD by December 31st! Building the PSF Q4 Fundraiser pypi.org |
#Maximo
#AssetandFacilitiesManagement