Skip to content
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

Add route for admins to create user sessions #22

Closed
gr2m opened this issue Feb 21, 2016 · 0 comments · Fixed by #25
Closed

Add route for admins to create user sessions #22

gr2m opened this issue Feb 21, 2016 · 0 comments · Fixed by #25

Comments

@gr2m
Copy link
Member

gr2m commented Feb 21, 2016

Follow up for #14

As an admin, I would like to be able to create a user session, so I can debug an account without messing with passwords.

I would suggest the route POST /account/{id}/sessions for that. Without any body (does JSON API allow that?).

The response would look like this:

{
  "links": {
    "self": "https://example.com/accounts/abc1234/sessions/sessionid123"
  },
  "data": {
    "id": "sessionid123",
    "type": "session",
    "relationships": {
      "account": {
        "links": {
          "related": "https://example.com/accounts/abc1234"
        },
        "data": {
          "id": "abc1234",
          "type": "account"
        }
      }
    }
  }
}

This implies that we would also need a GET /accounts/{id}/sessions/{id} and a DELETE /accounts/{id}/sessions/{id} route, which works for me.

Any objections / thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant