Interface ValidationApi
-
@Path("/_matrix/identity/api/v1") @Consumes("application/json") @Produces("application/json") public interface ValidationApi
Checking the validation of the 3pid ownership.
-
-
Method Summary
Modifier and Type Method Description void
bind(PublishRequest request, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
Publish an association between a session and a Matrix user ID.void
unbind(UnbindRequest request, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
Remove an association between a session and a Matrix user ID.void
validate(String sid, String clientSecret, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
Determines if a given 3pid has been validated by a user.
-
-
-
Method Detail
-
validate
@GET @Path("/3pid/getValidated3pid") void validate(@QueryParam("sid") String sid, @QueryParam("client_secret") String clientSecret, @Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.HttpHeaders httpHeaders, @Suspended javax.ws.rs.container.AsyncResponse asyncResponse)
Determines if a given 3pid has been validated by a user.
Return:ValidationResponse
.Status code 200: Validation information for the session.
Status code 400: The session has not been validated. 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.uriInfo
- Request information.httpHeaders
- Http headers.asyncResponse
- Asynchronous response.
-
bind
@POST @Path("/bind") void bind(PublishRequest request, @Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.HttpHeaders httpHeaders, @Suspended javax.ws.rs.container.AsyncResponse 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:
request
- JSON body request.uriInfo
- Request information.httpHeaders
- Http headers.asyncResponse
- Asynchronous response.
-
unbind
@POST @Path("/unbind") void unbind(UnbindRequest request, @Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.HttpHeaders httpHeaders, @Suspended javax.ws.rs.container.AsyncResponse asyncResponse)
Remove an association between a session and a Matrix user ID.
Future calls to /lookup for any of the session's 3pids will not return the removed association.
The identity server should authenticate the request in one of two ways:- The request is signed by the homeserver which controls the user_id.
- The request includes the sid and client_secret parameters, as per /3pid/bind, which proves ownership of the 3PID.
Return:EmptyResponse
.Status code 200: The association was successfully removed.
Status code 400: If the response body is not a JSON Matrix error, the identity server does not support unbinds. If a JSON Matrix error is in the response body, the requesting party should respect the error.
Status code 403: The credentials supplied to authenticate the request were invalid. This may also be returned if the identity server does not support the chosen authentication method (such as blocking homeservers from unbinding identifiers).
Status code 404: If the response body is not a JSON Matrix error, the identity server does not support unbinds. If a JSON Matrix error is in the response body, the requesting party should respect the error.
Status code 501: If the response body is not a JSON Matrix error, the identity server does not support unbinds. If a JSON Matrix error is in the response body, the requesting party should respect the error.
- Parameters:
request
- JSON body request.uriInfo
- Request information.httpHeaders
- Http headers.asyncResponse
- Asynchronous response.
-
-