IEngineIsAuthenticatedAsync Method |
IT Hit User File System
Indicates if user is authenticated.
Namespace:
ITHit.FileSystem
Assembly:
ITHit.FileSystem (in ITHit.FileSystem.dll) Version: 8.3.27213.0
Syntax Task<bool> IsAuthenticatedAsync(
IItemsChange itemsChange,
CancellationToken cancellationToken
)
Function IsAuthenticatedAsync (
itemsChange As IItemsChange,
cancellationToken As CancellationToken
) As Task(Of Boolean)
Task<bool>^ IsAuthenticatedAsync(
IItemsChange^ itemsChange,
CancellationToken cancellationToken
)
abstract IsAuthenticatedAsync :
itemsChange : IItemsChange *
cancellationToken : CancellationToken -> Task<bool>
Parameters
- itemsChange
- Type: ITHit.FileSystemIItemsChange
Information about the change in file system. - cancellationToken
- Type: System.ThreadingCancellationToken
The token to monitor for cancellation requests.
Return Value
Type:
TaskBooleanTrue if the user is authenticated. False - otherwise.
Remarks
In this method you will check if a user is authenticated and return the results to the Engine.
- In case of OAuth2 you will check your token expiration date or create a new token using your refresh token.
- In case of Basic, Digest, NTLM, Kerberos you will just check if you have stored login credentials.
- In case of cookies auth you will check the cookie expiration date.
You must NOT show any login UI in this method implementation. Typically, in this method, you will send requests to
your remote storage ONLY in case of OAuth2, to create a new token, if required.
You will NOT send requests to your remote storage in any other cases.
If this method returns false, on Windows platform the Engine you will call the [!:EngineWindows.AuthenticateAsync()] method,
in which you will show the login UI.
On macOS platform the sign-in banner is displayed in Finder. You will implement a macOS log-in UI in a separate macOS UI extension.
By default, this method always returns true.
See Also