AuthenticationService
A class in Alta.Platform.Generic, Alta.Platform.Generic.
Authentication for the generic platform (Windows and the server build): logs in to the Alta API with command line arguments, a refresh token or editor credentials. Platform login and linking aren't supported.
- Listed in Other Alta assemblies
- Inherits or implements
IAuthenticationService - Attributes
UsedImplicitly
Constructors
| Member | What it is |
|---|---|
AuthenticationService(IHighLevelApiClient apiClient, IAuthenticationUtility authenticationUtility) | Creates an AuthenticationService from apiClient and authenticationUtility. |
Fields
3 private and internal fields
| Member | What it is |
|---|---|
private readonly IHighLevelApiClient apiClient | The high-level Alta API client. |
private readonly IAuthenticationUtility authenticationUtility | Helper that does the actual login calls. |
private static readonly Logger logger | NLog logger for this class. |
Properties
| Member | What it is |
|---|---|
bool ExternalPlatformSigninRequired { get; } | Always false. |
IAuthenticationFeatures Features { get; } | An AuthenticationFeatures with everything off. |
1 private and internal property
Methods
| Member | What it is |
|---|---|
async Task<IResult> AutoLoginAsync() | Does nothing if already logged in; otherwise tries editor override credentials, then command line arguments, then the saved refresh token. |
Task<IResult<string>> GetAccessToken() | Always returns an error; platform access tokens aren't supported here. |
async Task<IResult<string>> GetAccessToken(bool forceRefresh) | Always returns an error; platform access tokens aren't supported here. |
Task<IResult> LinkPlatformAccount() | Throws NotSupportedException. |
Task<IResult> LoginWithPlatformCredentials() | Throws NotSupportedException. |
async Task<IResult<UserInfo>> RegisterAccount(string username, string password, string email, string referral) | Hashes the password and registers a new Alta account through the API, returning the new user's info. |
Task<IResult> UnlinkPlatformAccount() | Throws NotSupportedException. |