I am building a plugin for M-Files client which works with the REST-API. For the "plugin to server" communication to work, the client side plugin needs an authentication token.
Since the user has already logged in to the M-Files Desktop Client I would not like to ask the users to enter the server URL, user name and password into my plugin as well.
Instead I would like to make the plugin take care of the authentication in the background.
My plugin is started trough the main.js when a command button, within the M-Files UI, is pressed
I was hoping there is a way to retrieve the current URL, username and password or the authentication token alone.
Then I could pass it to the plugin for automatic authentication.
In case of retrieving only the token, I could use it directly for GET / POST calls.
Also, is there a way to check whether the returned authentication token is valid or just a dummy token?
Currently the authentication call returns a token even if the login credentials are not matching the vault.
Thank you for your response :)
Conclusion:
I don't believe that this will be possible. You cannot extract the credentials from the running client in that way.
