Closed chibenwa closed 3 years ago
Issues:
GET /token
endpoint (long live token auth only)GET /token
endpoint (long live token auth + basic auth)TODO write an ADR for TMail
See https://github.com/linagora/james-project-private/pull/226 for the ADR
Use of basic authentication.
CF https://github.com/linagora/tmail-flutter/issues/28
TMail backend offers better option
The first call is done with basic authentication to get the session (credential are so far kept in memory on the device side)
If the session contains the
com:linagora:long:lived:token
then the client does a second call (authenticated with basic auth):Will return :
TMail mobile then stores this long lived token. Given that token, TMail will not need user input upon connection.
This long lived token can be used to generate short lived JWT token that can be used for auth.
Example:
Will return:
(if the device id matches, fails otherwise) - (also please note that this token will need to be frequently renewed ;-) frequent renewal enforce security.)
And follow up requests can be done with:
Note that one:
Eg:
Will return :
To revoke access to my IOS device:
And again, if the account do not support this extension, we NEED to support basic authentication.