Class ClientAuthenticator
Overrides Authenticator for usage in client applications.
Inherited Members
Namespace: LemonEdge.Client.DB
Assembly: LemonEdge.ClientDB.dll
Syntax
public class ClientAuthenticator : Authenticator, IDatabaseAuthenticator, IAuthenticator
Constructors
ClientAuthenticator(IDataUpdaterFactory, IDatabaseInfoManager, IEntityContextFactory, IDatabaseStatusProxy, IDatabaseCacheFactory, IOptions<ClientAuthenticationSettings>, ILogger<Authenticator>)
Declaration
public ClientAuthenticator(IDataUpdaterFactory dataUpdaterFactory, IDatabaseInfoManager databaseInfoManager, IEntityContextFactory entityContextFactory, IDatabaseStatusProxy databaseStatusProxy, IDatabaseCacheFactory cacheFactory, IOptions<ClientAuthenticationSettings> authOptions, ILogger<Authenticator> logger)
Parameters
| Type | Name | Description |
|---|---|---|
| IDataUpdaterFactory | dataUpdaterFactory | |
| IDatabaseInfoManager | databaseInfoManager | |
| IEntityContextFactory | entityContextFactory | |
| IDatabaseStatusProxy | databaseStatusProxy | |
| IDatabaseCacheFactory | cacheFactory | |
| IOptions<ClientAuthenticationSettings> | authOptions | |
| ILogger<Authenticator> | logger |
Methods
GetClientLoginSettings()
Gets Client Settings. For a service this means the currently configured auth token handlers, plus Windows negotiate, if configured. For local db connection, this means Windows auth and or username and password.
Declaration
public override Task<ClientAuthenticationSettings> GetClientLoginSettings()
Returns
| Type | Description |
|---|---|
| Task<ClientAuthenticationSettings> | A ClientAuthenticationSettings object |
Overrides
GetLoginProviders()
Gets the login providers. For a service this means the currently configured auth token handlers, plus Windows negotiate, if configured. For local db connection, this means Windows auth and or username and password.
Declaration
public override Task<string[]> GetLoginProviders()
Returns
| Type | Description |
|---|---|
| Task<string[]> | A string array of the supported keys |
Overrides
Login(string, string)
Specifies to login into the system using the specified username/password login
Declaration
public override Task<UserInfo> Login(string userName, string password)
Parameters
| Type | Name | Description |
|---|---|---|
| string | userName | The unique username to login to the system with |
| string | password | The password |
Returns
| Type | Description |
|---|---|
| Task<UserInfo> | If the user successfully logs in then the system returns a new random and unique session id for this user to use. Otherwise no id is returned and an error is thrown |
Overrides
LoginWindowsUser(string, IPAddress)
Specifies to login into the system using the specified windows authentication login
Declaration
public override Task<UserInfo> LoginWindowsUser(string windowsDomainName = null, IPAddress ipAddress = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | windowsDomainName | |
| IPAddress | ipAddress |
Returns
| Type | Description |
|---|---|
| Task<UserInfo> | If the user successfully logs in then the system returns a UserInfo. Otherwise no id is returned and an error is thrown |