Hi Peter,
we use ISAM 907 fixpack 1.
I also tried with key-value pairs of strings:
var redir = ["https://testClient.com"];
var clientId = OAuthMappingExtUtils.generateRandomString(20);
var json = '{"result":"true", "count":"42"}';
var obj = JSON.parse(json);
client = OAuthMappingExtUtils.createClient("test", clientId, "test", "company", null, redir,"https://some.de","username1","emial1@test.de","49444", "other", "otherinfo", false, null, null, null, obj);
The error I get is:
Caused by: org.mozilla.javascript.EvaluatorException: Can't find method com.tivoli.am.fim.trustserver.sts.utilities.OAuthMappingExtUtils.createClient(string,java.lang.String,string,string,null,object,string,string,string,string,string,string,boolean,null,null,null,object)
------------------------------
Jürgen Hitt
------------------------------
Original Message:
Sent: Fri January 31, 2020 04:03 AM
From: Peter Volckaert
Subject: ISAM OAuth Client with extended properties
Hi Jürgen,
First, I'd verify the ISAM release you are using since these "extension properties" are relatively new: 9.0.6 I believe. See the Javadoc for a detailed description of the OAuthMappingExtUtils.createClient() of the release you are using.
What's the result code you're getting back from the JSON.parse? I may help to troubleshooting the problem.
Also I believe I've read somewhere that these properties must be key-value pairs of strings.
So try var json = '{"result":"true", "count":"42"}' instead of var json = '{"result":true, "count":42}';
Good luck & regards, Peter
------------------------------
Peter Volckaert
Senior Sales Engineer
Authentication and Access
IBM Security
Original Message:
Sent: Thu January 30, 2020 10:35 AM
From: Jürgen Hitt
Subject: ISAM OAuth Client with extended properties
Hello,
we implement a ISAM developer portal based on this example: https://www.ibm.com/blogs/security-identity-access/oauth-building-developer-portal/
The Client should be created including extended properties (JSON).
However the following code is not working:
var json = '{"result":true, "count":42}';
var extProp = JSON.parse(json);
client = OAuthMappingExtUtils.createClient("client1", clientId, "client1", "company", null, redir,"https://company.com","user1","user1@email.com","11111", "other", "otherinfo", false, null, null, null, extProp);
Without it works:
client = OAuthMappingExtUtils.createClient("client1", clientId, "client1", "company", null, redir,"https://company.com","user1","user1@email.com","11111", "other", "otherinfo", false, null, null, null);
Any hints how to do this?
------------------------------
Jürgen Hitt
------------------------------