Interface IAuthenticationService
Authentication service handles logging a user in and holding the current session data
Namespace: Simplic.Authentication
Assembly: Simplic.Authentication.dll
Syntax
public interface IAuthenticationService
Methods
| Improve this Doc View SourceLogin(String, String, String)
Authenticate a user and create a user session
Declaration
Session.Session Login(string domain, string userName, string password)
Parameters
Type | Name | Description |
---|---|---|
System.String | domain | Domain |
System.String | userName | User name |
System.String | password | Password |
Returns
Type | Description |
---|---|
Session.Session | A user session if the user could be logged in, else an exception will be thrown |
LoginByApiKey(String, String)
Authenticate a user and create a user session by given api key and user name
Declaration
Session.Session LoginByApiKey(string apiKey, string userName)
Parameters
Type | Name | Description |
---|---|---|
System.String | apiKey | Api key |
System.String | userName | User name |
Returns
Type | Description |
---|---|
Session.Session | A user session |
LoginByExternAccount(String)
Authenticate a user and create a user session
Declaration
Session.Session LoginByExternAccount(string externAccountName)
Parameters
Type | Name | Description |
---|---|---|
System.String | externAccountName | External account name |
Returns
Type | Description |
---|---|
Session.Session | A user session |
RemoveAutologin()
Remove autologin for the current windows user
Declaration
void RemoveAutologin()
SetAutologin(String, String, String)
Activate autologin
Declaration
void SetAutologin(string domain, string userName, string password)
Parameters
Type | Name | Description |
---|---|---|
System.String | domain | Current domain |
System.String | userName | Current user |
System.String | password | Current password |
TryAutologin()
Check whether autologin is existing and valid for the current user
Declaration
Session.Session TryAutologin()
Returns
Type | Description |
---|---|
Session.Session | Simplic session if login was successfull, or null |