Identity of the caller (in general)

I am writing a general-purpose reusable built-in service that gets registered with the WebhookFeature over at Webhooks.

The service needs to identify the current caller, and store the ID of that user, that is, if the AppHost supports the AuthenticationFeature, if it does not, then I guess we will create an ID for the anonymous user.

Given the various ways people use ServiceStack, and we want to give them a service that fits in with their service, what would be the most reliable way to get the ID of the caller?

Should I just assume Request.GetSession().UserAuthId?

Yeah that’d be the recommended way.

Great, thanks for the confirmation.

YAGNI for now then, but I guess if people want to use this WebhookFeature and have other ways of getting the ID of the user, they can extend it, with an extensions point we can put in later.