Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Implement whoami endpoint #404

Closed
3 tasks
anoadragon453 opened this issue Mar 2, 2018 · 7 comments · Fixed by #434
Closed
3 tasks

Implement whoami endpoint #404

anoadragon453 opened this issue Mar 2, 2018 · 7 comments · Fixed by #434

Comments

@anoadragon453
Copy link
Member

anoadragon453 commented Mar 2, 2018

Spec URL: https://matrix.org/docs/spec/client_server/r0.3.0.html#get-matrix-client-r0-account-whoami

Phase: 2

Difficulty: Easy

We receive an access token, and with that we return the user_id connected to that access token.

Summary:

  • Create endpoint for GET /account/whoami in routing.go
  • Return the correct user_id for the given access token. If no correct token was found, return M_UNKNOWN_TOKEN
  • Create test case(s) for /account/whoami with correct and incorrect access tokens.
@turt2live
Copy link
Member

(and make sure it works with appservices 😇 )

@anoadragon453
Copy link
Member Author

@turt2live Thanks! You think the spec would mention them :P

@turt2live
Copy link
Member

I wrote that spec, so that's more of an oversight on my part :(

/me scribbles unintelligible words on his todo list

@anoadragon453
Copy link
Member Author

APwhitehat added a commit to APwhitehat/dendrite that referenced this issue Mar 7, 2018
@richvdh
Copy link
Member

richvdh commented Mar 13, 2018

Ensure this endpoint works with Application Services. App services pass in ?user_id= as part of the request, so just need to hand this back.

This is true for most endpoints (and supporting it is not necessarily 'Easy'). We should probably have a separate bug to track it?

@anoadragon453
Copy link
Member Author

@richvdh Good point, I'll move it out.

@anoadragon453
Copy link
Member Author

Actually I'm pretty sure it's just tracked under #358.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants