Class AuthService
Service for working with auth in the Fast Report.
Inheritance
System.Object
    AuthService
  Namespace: FastReport.Auth
Assembly: FastReport.dll
Syntax
public class AuthService
  Properties
CanRefresh
Returns true, if user has offline_access scope and refresh_token is not null
Declaration
public bool CanRefresh { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
Instance
Instance of default Service.
Declaration
public static AuthService Instance { get; }
  Property Value
| Type | Description | 
|---|---|
| AuthService | 
IsEnable
Gets or sets indicator to enable or disable personalisation service
Declaration
public bool IsEnable { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
Settings
Setting of the service.
Declaration
public AuthService.AppSettings Settings { get; }
  Property Value
| Type | Description | 
|---|---|
| AuthService.AppSettings | 
User
User of the service.
Declaration
public AuthService.AppUser User { get; }
  Property Value
| Type | Description | 
|---|---|
| AuthService.AppUser | 
Methods
GenerateSignInUri(String)
If FastReport.config contains information about custom server and api-key to it, this method will reset inner instance with that data. Otherwise default server will be set.
Declaration
public string GenerateSignInUri(string redirectURI)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | redirectURI | 
Returns
| Type | Description | 
|---|---|
| System.String | 
GenerateSignOutUri(String)
The method creates an sign out link.
Declaration
public string GenerateSignOutUri(string redirectURI)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | redirectURI | 
Returns
| Type | Description | 
|---|---|
| System.String | 
Refresh()
If possible, the method updates the user credentials.
Declaration
public bool Refresh()
  Returns
| Type | Description | 
|---|---|
| System.Boolean | True if success  | 
      
Reset()
The method resets auth, without sign out process.
Declaration
public void Reset()
  SignIn(CancellationToken)
The method shows sign in form and auth the user.
Declaration
public async Task SignIn(CancellationToken token = default(CancellationToken))
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Threading.CancellationToken | token | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task | 
SignOut(CancellationToken)
The method shows sign out form and resets the user credentials.
Declaration
public async Task SignOut(CancellationToken token = default(CancellationToken))
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Threading.CancellationToken | token | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task |