Interface FallbackAuthApi


  • @Path("/_matrix")
    @Produces("text/html")
    public interface FallbackAuthApi
    If a client does not recognize any or all login flows it can use the fallback login API.
    • Method Summary

      Modifier and Type Method Description
      void auth​(String auth, String session, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Clients cannot be expected to be able to know how to process every single login type.
      void staticLogin​(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Fallback login.
    • Method Detail

      • staticLogin

        @GET
        @Path("/static/client/login")
        void staticLogin​(@Context
                         javax.ws.rs.core.UriInfo uriInfo,
                         @Context
                         javax.ws.rs.core.HttpHeaders httpHeaders,
                         @Suspended
                         javax.ws.rs.container.AsyncResponse asyncResponse)
        Fallback login.
        Return: Status code 200:

        This returns an HTML and JavaScript page which can perform the entire login process. The page will attempt to call the JavaScript function window.onLogin when login has been successfully completed.

        Parameters:
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • auth

        @GET
        @Path("/client/r0/auth/{auth}/fallback/web")
        void auth​(@PathParam("auth")
                  String auth,
                  @QueryParam("session")
                  String session,
                  @Context
                  javax.ws.rs.core.UriInfo uriInfo,
                  @Context
                  javax.ws.rs.core.HttpHeaders httpHeaders,
                  @Suspended
                  javax.ws.rs.container.AsyncResponse asyncResponse)
        Clients cannot be expected to be able to know how to process every single login type. If a client does not know how to handle a given login type, it can direct the user to a web browser with the URL of a fallback page which will allow the user to complete that login step out-of-band in their web browser.
        Return: Status code 200:

        an HTML page which can perform this authentication stage. This page must use the following JavaScript when the authentication has been completed.

        Parameters:
        auth - The type name of the stage it is attempting.
        session - the ID of the session given by the homeserver.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.