oxAuth
oxAuth copied to clipboard
Replace JSONObject with Jackson 2.x ObjectNode
There are many places where oxAuth builds JSON using JSONObject manually. This object is deprecated. During migration to Jackson 2.x we added org.json.JSONObject for code compatibility. Now to proper work with JSON we uses special mapper:
ObjectMapper mapper = new ObjectMapper();
mapper.registerModule(new JsonOrgModule());
With ObjectNode we don't need to register JsonOrgModule on each call. Also we can remove org.json library.
This issue is related to https://github.com/GluuFederation/oxAuth/issues/811
Duplicate of https://github.com/GluuFederation/oxAuth/issues/1079 ?
#1079 is about creation bean for discovery and then re-using that bean in other places (client, oxd). This ticket is about removing deprecated code.