1

Is there an easy way I can easily check whether I am currently logged into ServiceStack Auth by using a REST endpoint?

Szymon Rozga
  • 17,971
  • 7
  • 53
  • 66

1 Answers1

3

ServiceStack v4 has been recently updated, Friday 16 May, (in this commit) to support returning session information by making a GET request to the Authenticate route /auth.

Session

Thus if you have a valid session you will get a response such as:

{
    "UserId":"1",
    "SessionId":"1",
    "UserName":"bob",
    "ResponseStatus":{}
}

Otherwise you can always create a service that returns information about your session yourself. See my other answer for an example of this method.

Hope that helps.

Community
  • 1
  • 1
Scott
  • 21,211
  • 8
  • 65
  • 72