Click or drag to resize

IEngineIsAuthenticatedAsync Method

IT Hit User File System
Indicates if user is authenticated.

Namespace:  ITHit.FileSystem
Assembly:  ITHit.FileSystem (in ITHit.FileSystem.dll) Version: 8.2.27026.0
Syntax
Task<bool> IsAuthenticatedAsync(
	IItemsChange itemsChange,
	CancellationToken cancellationToken
)

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: TaskBoolean
True 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