Class XsrfHelper
Helper class to update/parse XSRF Paths and store/update the user preference.
Inherited Members
Namespace: SuperOffice.CRM
Assembly: SoDataBase.BusinessLogic.dll
Syntax
public class XsrfHelper
Constructors
XsrfHelper()
Helper class to update/parse XSRF Paths and store/update the user preference.
Declaration
public XsrfHelper()
Methods
GetXsrfPathsAsync(string, CancellationToken)
Helper class to update/parse XSRF Paths and store/update the user preference.
Declaration
public static Task<string[]> GetXsrfPathsAsync(string hostname, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | hostname | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<string[]> |
GetXsrfValueAsync(CancellationToken)
Returns the XSRF value and the last update time. If the value does not exist, it returns empty string and DateTime.MinValue.
Declaration
public static Task<(string, DateTime)> GetXsrfValueAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | A cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<(string, DateTime)> | XSRF value and last update time in UTC |
SetXsrfPathsAsync(string, string[], CancellationToken)
Helper class to update/parse XSRF Paths and store/update the user preference.
Declaration
public static Task SetXsrfPathsAsync(string hostname, string[] paths, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | hostname | |
| string[] | paths | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task |
SetXsrfValueAsync(string, CancellationToken)
Sets the XSRF value for the current user. If the user is not authenticated, it does nothing.
Declaration
public static Task SetXsrfValueAsync(string xsrfValue, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | xsrfValue | The XSRF value to set. |
| CancellationToken | cancellationToken | A cancellation token. |
Returns
| Type | Description |
|---|---|
| Task |