Skip to main content

IAuthEvents

Assembly: ServiceStack.dll
View Source
Declaration
public interface IAuthEvents

Methods

OnCreated(IRequest, IAuthSession)

Fired when a new Session is created

View Source
Declaration
void OnCreated(IRequest httpReq, IAuthSession session)
Parameters
TypeName
ServiceStack.Web.IRequesthttpReq
ServiceStack.Auth.IAuthSessionsession

OnRegistered(IRequest, IAuthSession, IServiceBase)

Called when the user is registered or on the first OAuth login

View Source
Declaration
void OnRegistered(IRequest httpReq, IAuthSession session, IServiceBase registrationService)
Parameters
TypeName
ServiceStack.Web.IRequesthttpReq
ServiceStack.Auth.IAuthSessionsession
ServiceStack.IServiceBaseregistrationService

Validate(IServiceBase, IAuthSession, IAuthTokens, Dictionary<String, String>)

Override with Custom Validation logic to Assert if User is allowed to Authenticate. Returning a non-null response invalidates Authentication with IHttpResult response returned to client.

View Source
Declaration
IHttpResult Validate(IServiceBase authService, IAuthSession session, IAuthTokens tokens, Dictionary<string, string> authInfo)
Returns

ServiceStack.Web.IHttpResult

Parameters
TypeName
ServiceStack.IServiceBaseauthService
ServiceStack.Auth.IAuthSessionsession
ServiceStack.Auth.IAuthTokenstokens
System.Collections.Generic.Dictionary<System.String,System.String>authInfo

OnAuthenticated(IRequest, IAuthSession, IServiceBase, IAuthTokens, Dictionary<String, String>)

Called after the user has successfully authenticated

View Source
Declaration
void OnAuthenticated(IRequest httpReq, IAuthSession session, IServiceBase authService, IAuthTokens tokens, Dictionary<string, string> authInfo)
Parameters
TypeName
ServiceStack.Web.IRequesthttpReq
ServiceStack.Auth.IAuthSessionsession
ServiceStack.IServiceBaseauthService
ServiceStack.Auth.IAuthTokenstokens
System.Collections.Generic.Dictionary<System.String,System.String>authInfo

OnLogout(IRequest, IAuthSession, IServiceBase)

Fired before the session is removed after the /auth/logout Service is called

View Source
Declaration
void OnLogout(IRequest httpReq, IAuthSession session, IServiceBase authService)
Parameters
TypeName
ServiceStack.Web.IRequesthttpReq
ServiceStack.Auth.IAuthSessionsession
ServiceStack.IServiceBaseauthService