BlackBerry Dynamics for .NET Maui
12.0.0.9
Runtime library for .NET Maui applications
|
Manage user authentication and require the user to authenticate. More...
Public Member Functions | |
string | Reauthenticate (string title, string message, int timeout, int gracePeriod, bool enforce, bool requirePassword) |
With this call, the user will be prompted to enter credentials into the Blackberry Dynamics Reauthentication screen. This call is non-blocking and will synchronously return the token to associate an event with a specific call. Result of the reauthentication will be received asynchronously with ReAuthenticationResultEvent. More... | |
string | Reauthenticate (string title, string message, int timeout, int gracePeriod) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
string | Reauthenticate (string title, string message, int timeout=30) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
Events | |
EventHandler< BBDReAuthenticationResultEventArgs > | ReAuthenticationResultEvent |
Occurs when there is a reauthentication result available. More... | |
Manage user authentication and require the user to authenticate.
The Authentication Manager Interface enables an application to request a user to reauthenticate. When called a user will be prompted to authenticate using whatever authentication method is specified by policy. For example, biometrics or security password. If the policy doesn't require a password, then a prompt will be displayed with an 'Authorize' button for the user to acknowledge.
There are two scenarios for using the interface.
Authorize an action
Before permitting a destructive or sensitive action, it may be necessary to confirm such a request is being initiated by an authorized user of the application. For example, during a request to delete all documents or share a file with an external recipient the application may want to first prompt the user to enter their security password. Alternatively, if a user is taking an action on a different device or website, it may be necessary to confirm the authenticity of the request by prompting the user to authorize the action on their BlackBerry Dynamics application, essentially a two-factor authentication (2FA). In this scenario the user is able to cancel the request and continue using the application.
Force reauthentication
The application may want to trigger the runtime state to become locked, perhaps due to a threat which has been detected or an anomaly in user behaviour. To continue using the application the user must authenticate.
To notify the application, the runtime raises the ReAuthenticationResultEvent. BBDReAuthenticationResultEventArgs will specify the reauthentication token and the details of the requests like result, error code and the type of the authentication which was used by the user.
string BBDXamarinForms.Common.Interfaces.AuthenticationManager.IBBDAuthenticationManager.Reauthenticate | ( | string | title, |
string | message, | ||
int | timeout, | ||
int | gracePeriod | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
string BBDXamarinForms.Common.Interfaces.AuthenticationManager.IBBDAuthenticationManager.Reauthenticate | ( | string | title, |
string | message, | ||
int | timeout, | ||
int | gracePeriod, | ||
bool | enforce, | ||
bool | requirePassword | ||
) |
With this call, the user will be prompted to enter credentials into the Blackberry Dynamics Reauthentication screen. This call is non-blocking and will synchronously return the token to associate an event with a specific call. Result of the reauthentication will be received asynchronously with ReAuthenticationResultEvent.
title | The string value used as the title of the BlackBerry Dynamics Reauthentication Screen shown to user. Title text should be less than 30 characters and be the name of the application or system triggering the request. |
message | The message body string shown to the user which should be less than 200 characters. The message should explain why the user is being asked to reauthenticate. However it should not make reference to how the user would authenticate as this communication is handled by the runtime. |
timeout | timeout value in seconds. The length of time the prompt to authorize is shown to the user. If the user doesn't authorize the request within the timeout a failure callback is sent with the result code ErrorExpired. The timeout value should be between 10 and 600 seconds and if not specified defaults to 30 seconds. The value is ignored if enforce is set to true . |
gracePeriod | The time in seconds to immediately return with success and without showing the Blackberry Dynamics Reauthentication Screen if the user has recently authenticated within the specified period. If grace period is not specified then it is assumed to be zero. |
enforce | bool value to require the application to immediately enter the locked authorization state and present the user with the specified message to authenticate. The user cannot cancel and must authenticate before they can use the application again. If the policy doesn't require a password then enforce is the same as not enforcing i.e. user just acknowledges. If enforce mode is applied, the timeout value is ignored. If enforce is not specified then it is assumed to be false . |
requirePassword | bool value which requires the user to authenticate with a password rather than biometrics. Only applicable when enforce is true . If gracePeriod is set then the runtime shall only return success if the user authenticated using a password within the grace period. i.e. if they authenticated last with biometrics then the prompt to reauthenticate will still be shown. If requirePassword is not specified then it is assumed to be false . |
string
value token which enables the caller to associate an event with a specific call to the interface (as interface will synchronously return with a unique token for that call)string BBDXamarinForms.Common.Interfaces.AuthenticationManager.IBBDAuthenticationManager.Reauthenticate | ( | string | title, |
string | message, | ||
int | timeout = 30 |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
EventHandler<BBDReAuthenticationResultEventArgs> BBDXamarinForms.Common.Interfaces.AuthenticationManager.IBBDAuthenticationManager.ReAuthenticationResultEvent |
Occurs when there is a reauthentication result available.