Bruce Hunter - 231 - Sep 11, 2014

I’m taking a look, but is the Custom class created for  CredentialsAuthProvider. Is this static or a specific instance per request? The reason I ask, is that the TryAuthenticate is the location where I get back if login is success via a UserProfile object I get back in a base class that I call.

I want to set session properties on my CustomSession class, but not in the TryAuthenticate method, but rather the OnAuthenticated method instead like it should be.

I was thinking of adding a Private member to the CustomAuthProvider class that I can set the UserProfile property in the TryAuthenticate method , then pick it backup in the OnAuthenticated method, then set the CustomSession with what I want.

Bruce Hunter:

I looked at base code for ServiceStack. I guess I can set the Custom Session in TryAuthenticate if wanted too.

The AuthProviders are singletons.

Bruce Hunter:

Okay, I must set the Session in the TryAuthenticate then if I want it to work correctly. Thanks.