Class RpAuthManager
Port of Delphi's TRpAuthManager: singleton managing authentication,
profile, tiers, OAuth flows (Google/Microsoft), email OTP, and config persistence.
Config is saved to %LOCALAPPDATA%\Reportman\reportman_auth.ini (shared with Delphi).
Inheritance
RpAuthManager
Assembly: Reportman.Designer.dll
Syntax
public class RpAuthManager
Fields
View Source
HUB_API_URL
Declaration
public const string HUB_API_URL = "https://api.reportman.es:7006"
Field Value
Properties
View Source
AIEnabled
Declaration
public bool AIEnabled { get; set; }
Property Value
View Source
AILanguage
Declaration
public string AILanguage { get; set; }
Property Value
View Source
InstallId
Declaration
public string InstallId { get; }
Property Value
View Source
Instance
Declaration
public static RpAuthManager Instance { get; }
Property Value
View Source
IsLoggedIn
Declaration
public bool IsLoggedIn { get; }
Property Value
View Source
Profile
Declaration
public RpProfile Profile { get; }
Property Value
View Source
Token
Declaration
public string Token { get; }
Property Value
View Source
UsesFreeCredits
Declaration
public bool UsesFreeCredits { get; }
Property Value
Methods
View Source
CheckStatusAsync()
Declaration
public Task CheckStatusAsync()
Returns
View Source
GetApiKeySchemasAsync(string)
GET /api/agent/databases using a Reportman Agent ApiKey.
Returns schemas as list of "DisplayName=hubDatabaseId|hubSchemaId"
Declaration
public Task<List<string>> GetApiKeySchemasAsync(string apiKey)
Parameters
| Type |
Name |
Description |
| string |
apiKey |
|
Returns
View Source
GetCreditsRatio()
Declaration
public double GetCreditsRatio()
Returns
View Source
GetUserAgentsAsync()
GET /api/agent/databases → { aiEndpoints: [...] }
Returns agents as list of "Name (AgentName)=id|secret|isOnline"
Declaration
public Task<List<string>> GetUserAgentsAsync()
Returns
View Source
GetUserSchemasAsync()
GET /api/agent/databases → { databases: [...], aiEndpoints: [...] }
Returns schemas as list of "DisplayName=hubDatabaseId|hubSchemaId"
Declaration
public Task<List<string>> GetUserSchemasAsync()
Returns
View Source
Log(string)
Declaration
public void Log(string msg)
Parameters
| Type |
Name |
Description |
| string |
msg |
|
View Source
LoginGoogleAsync()
Opens browser for Google OAuth, listens on localhost for callback,
exchanges code via POST /api/Login/google.
Declaration
public Task<bool> LoginGoogleAsync()
Returns
View Source
LoginMicrosoftAsync()
Declaration
public Task<bool> LoginMicrosoftAsync()
Returns
View Source
LoginWithCodeAsync(string, string)
POST /api/Login/email { email, emailCode, installId }
Declaration
public Task<bool> LoginWithCodeAsync(string email, string code)
Parameters
Returns
View Source
Logout()
Declaration
View Source
RefreshStatusInBackground()
Runs CheckStatusAsync on a background thread, then fires AuthChanged on completion.
Declaration
public void RefreshStatusInBackground()
View Source
RequestLoginCodeAsync(string)
POST /api/LoginResend/send { email }
Declaration
public Task<bool> RequestLoginCodeAsync(string email)
Parameters
| Type |
Name |
Description |
| string |
email |
|
Returns
Events
View Source
AuthChanged
Declaration
public event Action<bool> AuthChanged
Event Type
View Source
LogMessage
Declaration
public event Action<string> LogMessage
Event Type