Interface IDatabaseAuthenticator
Used by services for direct communication with the DB.
Inherited Members
Namespace: LemonEdge.API.Core.Context
Assembly: LemonEdge.API.dll
Syntax
public interface IDatabaseAuthenticator : IAuthenticator
Fields
InvalidUserException
For throwing when the user is invalid.
Declaration
public static readonly UnauthorizedAccessException InvalidUserException
Field Value
Type | Description |
---|---|
UnauthorizedAccessException |
Methods
GetDatabaseName(IPAddress)
Gets the name of the database that the service is connected to.
Declaration
Task<IEnumerable<string>> GetDatabaseName(IPAddress address = null)
Parameters
Type | Name | Description |
---|---|---|
IPAddress | address | The IP address |
Returns
Type | Description |
---|---|
Task<IEnumerable<string>> |
LoginViaDatabase(IPAddress, string, string)
Logs in via the database, with a username and password.
Declaration
Task<UserWithRoleNames> LoginViaDatabase(IPAddress address, string userName, string password)
Parameters
Type | Name | Description |
---|---|---|
IPAddress | address | The IP address |
string | userName | The username |
string | password | The password |
Returns
Type | Description |
---|---|
Task<UserWithRoleNames> |
ValidateUser(IUser)
Checks that the user is a valid LemonEdge user.
Declaration
Task ValidateUser(IUser user)
Parameters
Type | Name | Description |
---|---|---|
IUser | user | The IUser |
Returns
Type | Description |
---|---|
Task |