Add an openidish mechanism for proving to third parties that you own a given user_id

This commit is contained in:
Mark Haines 2016-05-05 13:42:44 +01:00
parent 97b9141245
commit 9c272da05f
7 changed files with 193 additions and 2 deletions

View file

@ -387,6 +387,11 @@ class FederationServer(FederationBase):
"events": [ev.get_pdu_json(time_now) for ev in missing_events],
})
@log_function
def on_openid_userinfo(self, token):
ts_now_ms = self._clock.time_msec()
return self.store.get_user_id_for_open_id_token(token, ts_now_ms)
@log_function
def _get_persisted_pdu(self, origin, event_id, do_auth=True):
""" Get a PDU from the database with given origin and id.