Skip to main content

Hi,

trying to see if I can get AIMMS (running locally on my computer) to talk to one of our internal authenticated API endpoints, but running into a problem with the callback url.

In the documentation, I see that the callback URL aimms will use locally is http://localhost/oauth2. However, when I run it from my own computer, I see it is actually using http://localhost:8080/oauth2.

Both of these unfortunately are not on the list of approved callback urls….

Since I am not the owner of the application that I trying to call, it is quite difficult for me to request a new URL to be added to the list of approved URLs. 

There is a local developer URL already approved and would like to make AIMMS use that particular one. The URL that is approved is http://localhost:3000/login/azure/authorized

Is there any way I can make AIMMS use this particular callback URL instead of the current hardcoded (which also is different from the documentation).

Hi! DEX 24.1.1.3 and up allows you to configure the port of the callback URL via the parameter dex::oauth::WebUIOAuthCallbackPort. Let us know if this helps!


Hi Roxanna,

 

from what I see, this only allows me to modify the port number. That is one part of the problem that I need indeed. However, the other part that I need to change is the path in the URL.

For the particular case I was looking at, I have been able to have people add the path ( /oauth2 ) to the list of approved callback urls. However, for other applications I might not be able to have people change that.

Next to the possibility of changing the port (using the parameter WebUIOAuthCallbackPort ), could it be possible to add also a string parameter like webUIOAuthCallbackPath that would have default value /oauth2, but that would allow me to change it to a custom (already approved callback url path) like /login/azure/authorized ). 

This way, if I am developing an AIMMS app that needs to communicate with an existing API endpoint for which the developers have already created an approved callback url for local development based on a localhost url, I can easily link to this API from the aimms application without having to request any changes in the setup of the existing api


@gdiepen 

DEX 24.2.1.6 implements this. You can configure it via dex::api::OAuth2CallbackPath


Awesome, thanks @MarcelRoelofs 


One quick question about that new parameter, is there a specific reason that it is under a different module than the port parameter (that is under dex::oauth, while this is under dex::api)?


Because that's where the other configuration parameters for the built-in webserver are as well :)


Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator