Interface DeprecatedApi


  • @Deprecated
    @Path("/_matrix/identity/api/v1")
    @Consumes("application/x-www-form-urlencoded")
    @Produces("application/json")
    public interface DeprecatedApi
    Deprecated.
    Deprecated API.
    • Method Detail

      • createEmailSessionDeprecated

        @Deprecated
        @POST
        @Path("/validate/email/requestToken")
        void createEmailSessionDeprecated​(@FormParam("client_secret")
                                          String clientSecret,
                                          @FormParam("email")
                                          String email,
                                          @FormParam("send_attempt")
                                          Long sendAttempt,
                                          @FormParam("next_link")
                                          String nextLink,
                                          @Context
                                          javax.ws.rs.core.UriInfo uriInfo,
                                          @Context
                                          javax.ws.rs.core.HttpHeaders httpHeaders,
                                          @Suspended
                                          javax.ws.rs.container.AsyncResponse asyncResponse)
        Create a session for validating an email address.
        The identity server will send an email containing a token. If that token is presented to the identity server in the future, it indicates that that user was able to read the email for that email address, and so we validate ownership of the email address.
        Note that homeservers offer APIs that proxy this API, adding additional behaviour on top, for example, /register/email/requestToken is designed specifically for use when registering an account and therefore will inform the user if the email address given is already registered on the server.
        Return: SessionResponse.

        Status code 200: Session created.

        Status code 400: An error ocurred. Some possible errors are:

        • M_INVALID_EMAIL: The email address provided was invalid.
        • M_EMAIL_SEND_ERROR: The validation email could not be sent.
        Parameters:
        clientSecret - Required. A unique string generated by the client, and used to identify the validation attempt. It must be a string consisting of the characters [0-9a-zA-Z.=_-]. Its length must not exceed 255 characters and it must not be empty.
        email - Required. The email address to validate.
        sendAttempt - Required. The server will only send an email if the send_attempt is a number greater than the most recent one which it has seen, scoped to that email + client_secret pair. This is to avoid repeatedly sending the same email in the case of request retries between the POSTing user and the identity server. The client should increment this value if they desire a new email (e.g. a reminder) to be sent.
        nextLink - Optional. When the validation is completed, the identity server will redirect the user to this URL.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • postValidateEmailDeprecated

        @Deprecated
        @POST
        @Path("/validate/email/submitToken")
        void postValidateEmailDeprecated​(@FormParam("sid")
                                         String sid,
                                         @FormParam("client_secret")
                                         String clientSecret,
                                         @FormParam("token")
                                         String token,
                                         @Context
                                         javax.ws.rs.core.UriInfo uriInfo,
                                         @Context
                                         javax.ws.rs.core.HttpHeaders httpHeaders,
                                         @Suspended
                                         javax.ws.rs.container.AsyncResponse asyncResponse)
        Validate ownership of an email address.
        If the three parameters are consistent with a set generated by a requestToken call, ownership of the email address is considered to have been validated. This does not publish any information publicly, or associate the email address with any Matrix user ID. Specifically, calls to /lookup will not show a binding.
        The identity server is free to match the token case-insensitively, or carry out other mapping operations such as unicode normalisation. Whether to do so is an implementation detail for the identity server. Clients must always pass on the token without modification.
        Return: ValidationResponse.

        Status code 200: The success of the validation.

        Parameters:
        sid - Required. The session ID, generated by the requestToken call.
        clientSecret - Required. The client secret that was supplied to the requestToken call.
        token - Required. The token generated by the requestToken call and emailed to the user.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • createPhoneSessionDeprecated

        @Deprecated
        @POST
        @Path("/validate/msisdn/requestToken")
        void createPhoneSessionDeprecated​(@FormParam("client_secret")
                                          String clientSecret,
                                          @FormParam("country")
                                          String country,
                                          @FormParam("phone_number")
                                          String phoneNumber,
                                          @FormParam("send_attempt")
                                          Long sendAttempt,
                                          @FormParam("next_link")
                                          String nextLink,
                                          @Context
                                          javax.ws.rs.core.UriInfo uriInfo,
                                          @Context
                                          javax.ws.rs.core.HttpHeaders httpHeaders,
                                          @Suspended
                                          javax.ws.rs.container.AsyncResponse asyncResponse)
        Create a session for validating a phone number.
        The identity server will send an SMS message containing a token. If that token is presented to the identity server in the future, it indicates that that user was able to read the SMS for that phone number, and so we validate ownership of the phone number.
        Note that homeservers offer APIs that proxy this API, adding additional behaviour on top, for example, /register/msisdn/requestToken is designed specifically for use when registering an account and therefore will inform the user if the phone number given is already registered on the server.
        Return: SessionResponse.

        Status code 200: Session created.

        Status code 400: An error ocurred. Some possible errors are:

        • M_INVALID_ADDRESS: The phone number provided was invalid.
        • M_SEND_ERROR: The validation SMS could not be sent.
        • M_DESTINATION_REJECTED: The identity server cannot deliver an SMS to the provided country or region.
        Parameters:
        clientSecret - Required. A unique string generated by the client, and used to identify the validation attempt. It must be a string consisting of the characters [0-9a-zA-Z.=_-]. Its length must not exceed 255 characters and it must not be empty.
        country - Required. The two-letter uppercase ISO country code that the number in phone_number should be parsed as if it were dialled from.
        phoneNumber - Required. The phone number to validate.
        sendAttempt - Required. The server will only send an SMS if the send_attempt is a number greater than the most recent one which it has seen, scoped to that country + phone_number + client_secret triple. This is to avoid repeatedly sending the same SMS in the case of request retries between the POSTing user and the identity server. The client should increment this value if they desire a new SMS (e.g. a reminder) to be sent.
        nextLink - Optional. When the validation is completed, the identity server will redirect the user to this URL.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • postValidatePhoneDeprecated

        @Deprecated
        @POST
        @Path("/validate/msisdn/submitToken")
        void postValidatePhoneDeprecated​(@FormParam("sid")
                                         String sid,
                                         @FormParam("client_secret")
                                         String clientSecret,
                                         @FormParam("token")
                                         String token,
                                         @Context
                                         javax.ws.rs.core.UriInfo uriInfo,
                                         @Context
                                         javax.ws.rs.core.HttpHeaders httpHeaders,
                                         @Suspended
                                         javax.ws.rs.container.AsyncResponse asyncResponse)
        Validate ownership of a phone number.
        If the three parameters are consistent with a set generated by a requestToken call, ownership of the email address is considered to have been validated. This does not publish any information publicly, or associate the email address with any Matrix user ID. Specifically, calls to /lookup will not show a binding.
        The identity server is free to match the token case-insensitively, or carry out other mapping operations such as unicode normalisation. Whether to do so is an implementation detail for the identity server. Clients must always pass on the token without modification.
        Return: ValidationResponse.

        Status code 200: The success of the validation.

        Parameters:
        sid - Required. The session ID, generated by the requestToken call.
        clientSecret - Required. The client secret that was supplied to the requestToken call.
        token - Required. The token generated by the requestToken call and sent to the user.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • publishDeprecated

        @Deprecated
        @POST
        @Path("/bind")
        void publishDeprecated​(@FormParam("sid")
                               String sid,
                               @FormParam("client_secret")
                               String clientSecret,
                               @FormParam("mxid")
                               String mxid,
                               @Context
                               javax.ws.rs.core.UriInfo uriInfo,
                               @Context
                               javax.ws.rs.core.HttpHeaders httpHeaders,
                               @Suspended
                               javax.ws.rs.container.AsyncResponse asyncResponse)
        Deprecated.
        in favor of ValidationApi#publish(PublishRequest, UriInfo, HttpHeaders, AsyncResponse).
        Publish an association between a session and a Matrix user ID.
        Future calls to /lookup for any of the session's 3pids will return this association.
        Return: PublishResponse.

        Status code 200: The association was published.

        Status code 400: The association was not published. If the session has not been validated, then errcode will be M_SESSION_NOT_VALIDATED. If the session has timed out, then errcode will be M_SESSION_EXPIRED.

        Status code 404: The Session ID or client secret were not found.

        Parameters:
        sid - Required. The Session ID generated by the requestToken call.
        clientSecret - Required. The client secret passed to the requestToken call.
        mxid - Required. The Matrix user ID to associate with the 3pids.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.