Skip to main content

IAuthEventsAsync

Assembly: ServiceStack.dll​
View Source​
Declaration
public interface IAuthEventsAsync

Methods​

OnRegisteredAsync(IRequest, IAuthSession, IServiceBase, CancellationToken)​

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

View Source​
Declaration
Task OnRegisteredAsync(IRequest httpReq, IAuthSession session, IServiceBase registrationService, CancellationToken token = default(CancellationToken))
Returns​

System.Threading.Tasks.Task

Parameters​
TypeName
ServiceStack.Web.IRequesthttpReq
ServiceStack.Auth.IAuthSessionsession
ServiceStack.IServiceBaseregistrationService
System.Threading.CancellationTokentoken

ValidateAsync(IServiceBase, IAuthSession, IAuthTokens, Dictionary<String, String>, CancellationToken)​

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
Task<IHttpResult> ValidateAsync(IServiceBase authService, IAuthSession session, IAuthTokens tokens, Dictionary<string, string> authInfo, CancellationToken token = default(CancellationToken))
Returns​

System.Threading.Tasks.Task<ServiceStack.Web.IHttpResult>

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

OnAuthenticatedAsync(IRequest, IAuthSession, IServiceBase, IAuthTokens, Dictionary<String, String>, CancellationToken)​

Called after the user has successfully authenticated

View Source​
Declaration
Task OnAuthenticatedAsync(IRequest httpReq, IAuthSession session, IServiceBase authService, IAuthTokens tokens, Dictionary<string, string> authInfo, CancellationToken token = default(CancellationToken))
Returns​

System.Threading.Tasks.Task

Parameters​
TypeName
ServiceStack.Web.IRequesthttpReq
ServiceStack.Auth.IAuthSessionsession
ServiceStack.IServiceBaseauthService
ServiceStack.Auth.IAuthTokenstokens
System.Collections.Generic.Dictionary<System.String,System.String>authInfo
System.Threading.CancellationTokentoken

OnLogoutAsync(IRequest, IAuthSession, IServiceBase, CancellationToken)​

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

View Source​
Declaration
Task OnLogoutAsync(IRequest httpReq, IAuthSession session, IServiceBase authService, CancellationToken token = default(CancellationToken))
Returns​

System.Threading.Tasks.Task

Parameters​
TypeName
ServiceStack.Web.IRequesthttpReq
ServiceStack.Auth.IAuthSessionsession
ServiceStack.IServiceBaseauthService
System.Threading.CancellationTokentoken