Skip to main content

UserService

A class in Alta.Platform.Generic, Alta.Platform.Generic.

IUserService for the generic platform. There is no platform user, so the user parts are empty or throw; authentication calls go to an inner AuthenticationService.

Constructors​

MemberWhat it is
UserService(IHighLevelApiClient apiClient, IAuthenticationUtility authUtility)Creates an UserService from apiClient and authUtility.

Fields​

1 private and internal field
MemberWhat it is
private readonly IAuthenticationService authServiceThe inner AuthenticationService that does the work.

Properties​

MemberWhat it is
bool ExternalPlatformSigninRequired { get; }From the inner service; always false.
IAuthenticationFeatures Features { get; }From the inner service; everything off.
bool IsLoggedIn { get; }Always false: there is no platform user. This is not the Alta API login.
IUser LoggedInUser { get; }Always null.
1 private and internal property
MemberWhat it is
private static string NoServicesMessage { get; }Error text saying this platform has no user services.

Methods​

MemberWhat it is
Task<IResult> AutoLoginAsync()Passes through to the inner AuthenticationService.
Task<IResult<string>> GetAccessToken()Passes through; always an error here.
Task<IResult<string>> GetAccessToken(bool forceRefresh)Passes through; always an error here.
string GetUsername()Throws NotImplementedException.
Task<IResult<IUser>> GetUserWithId(string userId)Throws NotImplementedException.
Task<IResult> LinkPlatformAccount()Passes through; throws.
Task<IResult> LoginWithPlatformCredentials()Passes through; throws.
Task<IResult> RefreshLoggedInUser()Succeeds in the editor; throws NotImplementedException in builds.
Task<IResult<UserInfo>> RegisterAccount(string username, string password, string email, string referral)Passes through to register an Alta account.
Task<IResult> UnlinkPlatformAccount()Passes through; throws.