mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-08 18:25:02 -04:00
/tokenrefresh POST endpoint
This allows refresh tokens to be exchanged for (access_token, refresh_token). It also starts issuing them on login, though no clients currently interpret them.
This commit is contained in:
parent
13a6517d89
commit
cecbd636e9
9 changed files with 232 additions and 8 deletions
|
@ -78,13 +78,15 @@ class LoginRestServlet(ClientV1RestServlet):
|
|||
login_submission["user"] = UserID.create(
|
||||
login_submission["user"], self.hs.hostname).to_string()
|
||||
|
||||
token = yield self.handlers.auth_handler.login_with_password(
|
||||
auth_handler = self.handlers.auth_handler
|
||||
access_token, refresh_token = yield auth_handler.login_with_password(
|
||||
user_id=login_submission["user"],
|
||||
password=login_submission["password"])
|
||||
|
||||
result = {
|
||||
"user_id": login_submission["user"], # may have changed
|
||||
"access_token": token,
|
||||
"access_token": access_token,
|
||||
"refresh_token": refresh_token,
|
||||
"home_server": self.hs.hostname,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue