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
Type | Name |
---|---|
ServiceStack.Web.IRequest | httpReq |
ServiceStack.Auth.IAuthSession | session |
ServiceStack.IServiceBase | registrationService |
System.Threading.CancellationToken | token |
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
Type | Name |
---|---|
ServiceStack.IServiceBase | authService |
ServiceStack.Auth.IAuthSession | session |
ServiceStack.Auth.IAuthTokens | tokens |
System.Collections.Generic.Dictionary<System.String,System.String> | authInfo |
System.Threading.CancellationToken | token |
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
Type | Name |
---|---|
ServiceStack.Web.IRequest | httpReq |
ServiceStack.Auth.IAuthSession | session |
ServiceStack.IServiceBase | authService |
ServiceStack.Auth.IAuthTokens | tokens |
System.Collections.Generic.Dictionary<System.String,System.String> | authInfo |
System.Threading.CancellationToken | token |
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
Type | Name |
---|---|
ServiceStack.Web.IRequest | httpReq |
ServiceStack.Auth.IAuthSession | session |
ServiceStack.IServiceBase | authService |
System.Threading.CancellationToken | token |