Interface IAuthenticationService
Interface IAuthenticationService
Namespace: ISynergy.Framework.Mvvm.Abstractions.Services
Assembly: ISynergy.Framework.Mvvm.dll
Syntax
public interface IAuthenticationService
Methods
View SourceAuthenticateWithApiKeyAsync(String, CancellationToken)
authenticate with API key as an asynchronous operation.
Declaration
Task AuthenticateWithApiKeyAsync(string apiKey, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | apiKey | The API key. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task | A Task<System.Threading.Tasks.Task> representing the asynchronous operation. |
AuthenticateWithClientCredentialsAsync(CancellationToken)
authenticate with client credentials as an asynchronous operation.
Declaration
Task AuthenticateWithClientCredentialsAsync(CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task | A Task<System.Threading.Tasks.Task> representing the asynchronous operation. |
AuthenticateWithRefreshTokenAsync(String, CancellationToken)
authenticate with refresh token as an asynchronous operation.
Declaration
Task AuthenticateWithRefreshTokenAsync(string refreshtoken, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | refreshtoken | The refreshtoken. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task | A Task<System.Threading.Tasks.Task> representing the asynchronous operation. |
AuthenticateWithUsernamePasswordAsync(String, String, Boolean, CancellationToken)
authenticate with username password as an asynchronous operation.
Declaration
Task AuthenticateWithUsernamePasswordAsync(string username, string password, bool remember, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | The username. |
System.String | password | The password. |
System.Boolean | remember | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task | A Task<System.Threading.Tasks.Task> representing the asynchronous operation. |
CheckRegistrationEmailAsync(String, CancellationToken)
Checks if email address is available.
Declaration
Task<bool> CheckRegistrationEmailAsync(string email, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | The email. |
|
CancellationToken | cancellationToken | The cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
Task<System.Boolean> | Task<System.Boolean>. |
CheckRegistrationNameAsync(String, CancellationToken)
Checks if license name is available.
Declaration
Task<bool> CheckRegistrationNameAsync(string name, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
CancellationToken | cancellationToken | The cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
Task<System.Boolean> | Task<System.Boolean>. |
GetCountriesAsync(CancellationToken)
Get all countries from masterdata.
Declaration
Task<List<Country>> GetCountriesAsync(CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<List<Country>> |
GetEnvironmentalAuthToken(String)
Declaration
string GetEnvironmentalAuthToken(string token)
Parameters
Type | Name | Description |
---|---|---|
System.String | token |
Returns
Type | Description |
---|---|
System.String |
GetModulesAsync(CancellationToken)
Gets the modules asynchronous.
Declaration
Task<List<Module>> GetModulesAsync(CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
Task<List<Module>> | Task<List<Module>>. |
OnAuthenticationChanged(ReturnEventArgs<Boolean>)
Handles the AuthenticationChanged event.
Declaration
void OnAuthenticationChanged(ReturnEventArgs<bool> e)
Parameters
Type | Name | Description |
---|---|---|
ReturnEventArgs<System.Boolean> | e | The ReturnEventArgs<T> instance containing the event data. |
RegisterNewAccountAsync(RegistrationData, CancellationToken)
Registers a new account.
Declaration
Task<bool> RegisterNewAccountAsync(RegistrationData registration, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
RegistrationData | registration | The e. |
CancellationToken | cancellationToken | The cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
Task<System.Boolean> | Task<System.Boolean>. |
ResetPasswordAsync(String, CancellationToken)
Requests a password reset.
Declaration
Task<bool> ResetPasswordAsync(string email, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | The email. |
|
CancellationToken | cancellationToken | The cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
Task<System.Boolean> | Task<System.Boolean>. |
SignOutAsync()
Declaration
Task SignOutAsync()
Returns
Type | Description |
---|---|
Task |
Events
View SourceAuthenticationChanged
Occurs when authentication changed.
Declaration
event EventHandler<ReturnEventArgs<bool>> AuthenticationChanged
Event Type
Type | Description |
---|---|
EventHandler<ReturnEventArgs<System.Boolean>> |