anyways-open / impact-qgis-plugin

QGIS plugin as part of the ANYWAYS Impact tools.
https://www.anyways.eu
MIT License
2 stars 0 forks source link

Implement authentication using password grant #21

Open xivk opened 2 years ago

xivk commented 2 years ago

The plugin needs to request a token using the password grant after this feature has been implemented in the identity API:

https://github.com/anyways-open/identity-api/issues/16

The plugin needs to use this flow to send a token generate by the user account service:

https://docs.identityserver.io/en/release/quickstarts/2_resource_owner_passwords.html#requesting-a-token-using-the-password-grant

This is a .NET client that is being used in the example but there is not reason for this not being possible in Python.

How does the token work?

The username is user-secret and the password is the generated token. The identity API will use the token to lookup the user and authenticate the user. In the following step an access token can requested and all the ANYWAYS APIs can be accessed as if the user authenticated as they would normally via the web interface.