New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec /account/whoami #1063

Merged
merged 5 commits into from Nov 14, 2017

Conversation

Projects
None yet
3 participants
@turt2live
Member

turt2live commented Nov 13, 2017

Clients may wish to be able to identify which user they are supposed to be representing from only an access token. This new endpoint gives limited information to the client about the authenticated user.

Spec /account/whoami
Signed-off-by: Travis Ralston <travpc@gmail.com>
@matrixbot

This comment has been minimized.

Member

matrixbot commented Nov 13, 2017

Can one of the admins verify this patch?

turt2live added some commits Nov 13, 2017

Add /account/whoami to changelog
Signed-off-by: Travis Ralston <travpc@gmail.com>
Make it less obvious where this was copy/pasted from
Signed-off-by: Travis Ralston <travpc@gmail.com>
@richvdh

This comment has been minimized.

Member

richvdh commented Nov 13, 2017

matrixbot: test this please

@richvdh

looks good except for a couple of nits!

application/json: {
"user_id": "@joe:example.org"
}
schema:

This comment has been minimized.

@richvdh

richvdh Nov 13, 2017

Member

this needs a required: ['user_id'] (iirc)

This comment has been minimized.

@turt2live

turt2live Nov 13, 2017

Member

I'm not seeing that on other response schemas, is that needed for both responses and requests?

I've addressed the other concerns.

This comment has been minimized.

@turt2live

turt2live Nov 14, 2017

Member

I've added the required node. All of the references I used didn't have it, but some older documentation does (media repo, for instance).

# limitations under the License.
swagger: '2.0'
info:
title: "Matrix Client-Server Client Config API"

This comment has been minimized.

@richvdh

richvdh Nov 13, 2017

Member

this looks like an inappropriate c&p.

summary: Gets information about the owner of an access token.
description: |-
Gets information about the owner of a given access token. Currently this
only supports returning the user id that owns the token.

This comment has been minimized.

@richvdh

richvdh Nov 13, 2017

Member

I'm not sure this second sentence is adding any value tbh.

turt2live added some commits Nov 13, 2017

Update whoami endpoint
Signed-off-by: Travis Ralston <travpc@gmail.com>
Add required property to whoami
Signed-off-by: Travis Ralston <travpc@gmail.com>
@richvdh

This comment has been minimized.

Member

richvdh commented Nov 14, 2017

THanks!

@richvdh richvdh merged commit 85340a9 into matrix-org:master Nov 14, 2017

@turt2live turt2live deleted the turt2live:travis/whoami branch Mar 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment