/// <summary> Interface provides the '<see cref="IAuthClient"/>' definition for accessing API endpoints related to user authentication and application authorization.
/// </summary>
publicinterfaceIAuthClient
{
#regionInit/Deinit
/// <summary> Initializes the client for the specified application, setting up necessary configurations and preparing it for user authentication, application authorization and token management.
/// </summary>
/// <param name="appName"> The application name, which is used as the target for server interaction and token processing. </param>
/// <returns> 'true' if initialization has been proccessed successfuly. </returns>
/// <summary> Processes user logout for refresh token associated application.<br/>
/// The available refresh token will be set as revoked in the database, which is why a full login process will be required the next time the application is started.
/// </summary>
/// <param name="refreshToken"> The refresh token to be set as revoked. </param>
TaskLogoutAsync(stringrefreshToken);
#endregionRegister/Login/Logout
#regionGetUpdatedTokenSet
/// <summary> Creates a new access token from the assigned refresh token identifier, if it is expired, and also creates a new refresh token if its expired, too.
/// </summary>
/// <param name="authorizationRefreshRequest"> The '<see cref="AuthorizationRefreshRequest"/>' dataset that contains the authorization refresh data used for validation. </param>
/// <returns>
/// Item1 = The from authorization server created tokens and their expiration times.<br/>
/// Item2 = 'true' specifies that the RefreshToken is invalid on server side (unauthorized).
/// <summary> Interface for authentication and authorization for usage of direct library access.
namespaceAuth.Shared.Interfaces;
/// <summary> Interface of client's authentication and authorization used for direct library access.
/// </summary>
publicinterfaceIAAController
publicinterfaceIAuthController
{
/// <summary> Checks for an accessible IAM server data and gets the number of available UserAccounts.
/// </summary>
/// <returns> Status code 'Ok' (200) for an accessible IAM server and the number of available UserAccounts. </returns>
Task<ActionResult<bool>>Ready();
/// <summary> Processes user registration at IAM server for a new (not existing) user.
/// </summary>
/// <param name="authenticationRegisterRequest"> The '<see cref="AuthenticationRegisterRequest"/>' dataset that contains the user account to be created.</param>
/// <returns> Status code 'Ok' (200) for an successful registration and the created '<see cref="Models.UserIdent.UserIdent"/>' dataset. </returns>
/// <summary> Processes user login at IAM server for an existing user.
/// </summary>
/// <param name="authenticationRequest"> The '<see cref="AuthenticationLoginRequest"/>' dataset contains parameters to find the user to be logged in. </param>
/// <returns> Status code 'Ok' (200) for an successful login and the created authentication code with associated '<see cref="Models.UserIdent.UserIdent"/>' dataset. </returns>
/// <returns> Status code 'Ok' (200) for an successful login and the created authentication code with associated '<see cref="UserIdent"/>' dataset. </returns>
/// <summary> Exchanges an assigned authorization code for a generated access token for a target application.
/// </summary>
/// <param name="authorizationRequest"> The '<see cref="AuthorizationRequest"/>' dataset contains the authorization code to create the access token. </param>
/// <returns> Status code 'Ok' (200) for an successful authorization with the created access tokens and associtated expiry dates. </returns>
/// <summary> Creates a new refresh token from the assigned old one.<br/>
/// Call this service before old access token expires. Otherwise, a new access token needs to be created via '<see cref="Login"/>' + '<see cref="Authorize"/>'.
/// Call this service before old access token expires. Otherwise, a new access token needs to be created via '<see cref="Authenticate"/>' + '<see cref="Token"/>'.
/// </summary>
/// <param name="refreshToken"> The current refresh token, which is used to create a new access token.<br/>It also includes the name of processed application and the machine name. </param>
/// <param name="authorizationRefreshRequest"> The '<see cref="AuthorizationRefreshRequest"/>' dataset that contains the authorization refresh data used for validation. </param>
/// <returns> Status code 'Ok' (200) for an successful refresh and the created access tokens together with associtated expiry dates. </returns>
/// <summary> Processes user logout for assigned refresh token of associated application.<br/>
/// The assigned refresh token will be deleted from the database, which is why a full login process will be required the next time the application is started.
/// </summary>
/// <param name="refreshToken"> The current refresh token, for which to process the logout. </param>
/// <param name="authorizationRefreshRequest"> The '<see cref="AuthorizationRefreshRequest"/>' dataset that contains the authorization refresh data used for validation. </param>
/// <returns> Status code 'Ok' (200) if logout was successful. </returns>
/// <summary> Interface provides the '<see cref="IIamApiClient"/>' definition for accessing IAM data endpoints.
/// </summary>
publicinterfaceIIamApiClient
{
#regionInit/Deinit
/// <summary> Initializes the client with setting up necessary configurations and preparing it for IAM data endpoint communication.
/// </summary>
/// <returns> 'true' if initialization has been proccessed successfuly. </returns>
Task<bool>InitializeAsync();
/// <summary> Deinitializes the client, resetting configurations and preparing it for a fresh start or application shutdown.
/// </summary>
TaskDeinitializeAsync();
#endregionInit/Deinit
#regionUserAccount(s)
/// <summary> Gets all user accounts.
/// </summary>
/// <param name="errorResponseAsPopup"> The flag specifies with 'true' to show error messages via popup dialog.<br/>'false' sends a notification to the application's log. </param>
/// <returns> The collection of all user accounts. </returns>
/// <summary> Gets the user account of assigned primary key.
/// </summary>
/// <param name="primaryKey"> The primary key of the user account to be filtered. </param>
/// <param name="errorResponseAsPopup"> The flag specifies with 'true' to show error messages via popup dialog.<br/>'false' sends a notification to the application's log. </param>
/// <returns> The user account of assigned primary key. </returns>
/// <summary> Initializes the third party tool's proxy client for a specific application and identified user.<br/>
/// Existing client instances of same application and identified user will be overridden.
/// </summary>
/// <param name="appName"> The '<see cref="ApplicationName"/>' value, for which the third party controller needs to be initialized. </param>
/// <param name="userIdentPrimaryKey"> The primary key of the identified user, who wants to use the third party data endpoints. </param>
/// <param name="baseUrl"> The base url of used end points. </param>
/// <param name="errorResponseAsPopup"> The flag specifies with 'true' to show error messages via popup dialog.<br/>'false' sends a notification to the application's log. </param>
/// <returns> 'true' if initialization has been processed successfully. </returns>
/// <summary> Deinitializes the third party tool's proxy client for a specific application and identified user.<br/>
/// </summary>
/// <param name="appName"> The '<see cref="ApplicationName"/>' for which the third party controller needs to be deinitialized. </param>
/// <param name="userIdentPrimaryKey"> The primary key of the identified user, who had used the third party data endpoints. </param>
/// <param name="errorResponseAsPopup"> The flag specifies with 'true' to show error messages via popup dialog.<br/>'false' sends a notification to the application's log. </param>
/// <summary> Forwards a GET request to the assigned third party application's resource endpoint.
/// </summary>
/// <param name="appName"> The identified '<see cref="ApplicationName"/>', for which the third party controller processes the request. </param>
/// <param name="userIdentPrimaryKey"> The primary key of the identified user, who wants to use this third party data endpoint. </param>
/// <param name="resource"> The relative endpoint url for the processed resource. </param>
/// <param name="errorResponseAsPopup"> The flag specifies with 'true' to show error messages via popup dialog.<br/>'false' sends a notification to the application's log. </param>
/// <returns> The forwarded content from assigned third party application's resource endpoint. </returns>
/// <summary> Forwards a POST request to the assigned third party application's resource endpoint.
/// </summary>
/// <param name="appName"> The identified '<see cref="ApplicationName"/>', for which the third party controller processes the request. </param>
/// <param name="userIdentPrimaryKey"> The primary key of the identified user, who wants to use this third party data endpoint. </param>
/// <param name="resource"> The relative endpoint url for the processed resource. </param>
/// <param name="data"> The sended data object, which is converted to json. </param>
/// <param name="errorResponseAsPopup"> The flag specifies with 'true' to show error messages via popup dialog.<br/>'false' sends a notification to the application's log. </param>
/// <returns> The forwarded content from assigned third party application's resource endpoint. </returns>
/// <summary> Forwards a PUT request to the assigned third party application's resource endpoint.
/// </summary>
/// <param name="appName"> The identified '<see cref="ApplicationName"/>', for which the third party controller processes the request. </param>
/// <param name="userIdentPrimaryKey"> The primary key of the identified user, who wants to use this third party data endpoint. </param>
/// <param name="resource"> The relative endpoint url for the processed resource. </param>
/// <param name="data"> The sended data object, which is converted to json. </param>
/// <param name="errorResponseAsPopup"> The flag specifies with 'true' to show error messages via popup dialog.<br/>'false' sends a notification to the application's log. </param>
/// <returns> The forwarded content from assigned third party application's resource endpoint. </returns>
/// <summary> Forwards a DELETE request to the assigned third party application's resource endpoint.
/// </summary>
/// <param name="appName"> The identified '<see cref="ApplicationName"/>', for which the third party controller processes the request. </param>
/// <param name="userIdentPrimaryKey"> The primary key of the identified user, who wants to use this third party data endpoint. </param>
/// <param name="resource"> The relative endpoint url for the processed resource. </param>
/// <param name="errorResponseAsPopup"> The flag specifies with 'true' to show error messages via popup dialog.<br/>'false' sends a notification to the application's log. </param>
/// <returns> The forwarded content from assigned third party application's resource endpoint. </returns>