@@ -433,13 +433,12 @@ User-Interactive Authentication API
433433Overview
434434<<<<<<<<
435435
436- Some API endpoints require authentication that
437- interacts with the user. The homeserver may provide many different ways of
438- authenticating, such as user/password auth, login via a social network (OAuth2),
439- login by confirming a token sent to their email address, etc. This specification
440- does not define how homeservers should authorise their users but instead
441- defines the standard interface which implementations should follow so that ANY
442- client can login to ANY homeserver.
436+ Some API endpoints require authentication that interacts with the user. The
437+ homeserver may provide many different ways of authenticating, such as
438+ user/password auth, login via a single-sign-on server (SSO), etc. This
439+ specification does not define how homeservers should authorise their users but
440+ instead defines the standard interface which implementations should follow so
441+ that ANY client can login to ANY homeserver.
443442
444443The process takes the form of one or more 'stages'. At each stage the client
445444submits a set of data for a given authentication type and awaits a response
@@ -665,11 +664,9 @@ Authentication types
665664This specification defines the following auth types:
666665 - ``m.login.password ``
667666 - ``m.login.recaptcha ``
668- - ``m.login.oauth2 ``
669667 - ``m.login.sso ``
670668 - ``m.login.email.identity ``
671669 - ``m.login.msisdn ``
672- - ``m.login.token ``
673670 - ``m.login.dummy ``
674671
675672Password-based
@@ -746,66 +743,6 @@ To use this authentication type, clients should submit an auth dict as follows:
746743 "session" : " <session ID>"
747744 }
748745
749- Token-based
750- <<<<<<<<<<<
751- :Type:
752- ``m.login.token ``
753- :Description:
754- The client submits a login token.
755-
756- To use this authentication type, clients should submit an auth dict as follows:
757-
758- .. code :: json
759-
760- {
761- "type" : " m.login.token" ,
762- "token" : " <token>" ,
763- "txn_id" : " <client generated nonce>" ,
764- "session" : " <session ID>"
765- }
766-
767-
768- A client may receive a login ``token `` via some external service, such as email
769- or SMS. Note that a login token is separate from an access token, the latter
770- providing general authentication to various API endpoints.
771-
772- Additionally, the server must encode the user ID in the ``token ``; there is
773- therefore no need for the client to submit a separate username.
774-
775- The ``txn_id `` should be a random string generated by the client for the
776- request. The same ``txn_id `` should be used if retrying the request. The
777- ``txn_id `` may be used by the server to disallow other devices from using the
778- token, thus providing "single use" tokens while still allowing the device to
779- retry the request. This would be done by tying the token to the ``txn_id ``
780- server side, as well as potentially invalidating the token completely once the
781- device has successfully logged in (e.g. when we receive a request from the
782- newly provisioned access_token).
783-
784-
785- OAuth2-based
786- <<<<<<<<<<<<
787- :Type:
788- ``m.login.oauth2 ``
789- :Description:
790- Authentication is supported via OAuth2 URLs. This login consists of multiple
791- requests.
792- :Parameters:
793- ``uri ``: Authorization Request URI OR service selection URI. Both contain an
794- encoded ``redirect URI ``.
795-
796- The homeserver acts as a 'confidential' client for the purposes of OAuth2. If
797- the uri is a ``service selection URI ``, it MUST point to a webpage which prompts
798- the user to choose which service to authorize with. On selection of a service,
799- this MUST link through to an ``Authorization Request URI ``. If there is only one
800- service which the homeserver accepts when logging in, this indirection can be
801- skipped and the "uri" key can be the ``Authorization Request URI ``.
802-
803- The client then visits the ``Authorization Request URI ``, which then shows the
804- OAuth2 Allow/Deny prompt. Hitting 'Allow' redirects to the ``redirect URI `` with
805- the auth code. Homeservers can choose any path for the ``redirect URI ``. Once
806- the OAuth flow has completed, the client retries the request with the session
807- only, as above.
808-
809746 Single Sign-On
810747<<<<<<<<<<<<<<
811748:Type:
0 commit comments