diff options
author | Abhiseck Paira <abhiseckpaira@disroot.org> | 2022-01-13 20:07:42 +0530 |
---|---|---|
committer | Abhiseck Paira <abhiseckpaira@disroot.org> | 2022-01-13 20:07:42 +0530 |
commit | 9ca02d048fdb70c1edec189ddf87265dfb4c80b2 (patch) | |
tree | b210d42390afb59f8feb412632594eab6aa829c5 /test/mastodon-auth-tests.el | |
parent | 03365c8fbaac2c71e6bbfed731ae88d551175c2c (diff) |
re-implement user auth and token generation mechanism
Refactor `mastodon-auth--generate-token' to work with new user
authentication and token generation mechanism. This enables mastodon.el
to work with 2FA and also not to handle password directly.
In this implementation mastodon-auth--generate-token gets authorization
code from the user and sends post request to mastodon server. Ask for
authorization code from the user using two helper functions:
* mastodon-auth--ask-authorization-code: Explain to the user what the
user needs to do to get the authorization code. Store this explanation
message in variable `mastodon-auth--explanation'.
* mastodon-auth--get-browser-login-url: Return a appropriate query
string appended to url to the caller, which is needed by the user to
access the authorization code.
Diffstat (limited to 'test/mastodon-auth-tests.el')
0 files changed, 0 insertions, 0 deletions