Ds Login
DsLogin is the main interface for the SDK. It contains all the methods that can be called to interact with the SDK.
The DsLoginProvider class should be used to get an instance of this interface.
Functions
This method should be called on embedded web view redirects to check if the URL redirected to, is a trigger for a WebViewAction.
Clears the biometric login setup. After calling this the token will be cleared and the user will have to set up biometric login again.
Returns the time the session was created. This is the time the session was created and can be used to show the user how long the session has been active.
This method should be called on deep links into the application to check if the URL is part of the login flow. If the URL is part of the login flow, the INTERCEPTED action will be returned and the application should wait on login complete. If the URL is not part of the login flow, the NO_ACTION case will be returned, and the application should handle the deeplink as normal.
Checks if the user has auto login enabled. When biometric setup is complete, the auto login flag is set to true by default.
Checks if the user has set up biometric login
Can be called to validate if the current session is still valid. The session is retained in the SDK and on startup the previous session used could still be valid, in that case the user does not need to login again. This should be called before any auto login feature might trigger. If the session is not valid, the user should be prompted to login again.
Starts the login flow. This will open the biometric or web login screen and return a LoginComplete object when the user has successfully logged in.
Opens the url in the external web view (CustomTab/SFSafariViewController). This external web view is the same as the one used in login (colored base on the dsApplication selected). This is a convenience method to open the external web view, the requestAuthenticatedUrl method should still be called on the url if user context is required on the website.
Requests a valid access token. This should be called before every use to ensure the token has not expired. The token is automatically refreshed when it expires.
Requests a valid authenticated url. This enriches the plainUrl parameter String with the session detail so that the URL String returned can be opened in a web view or browser.
Requests a legacy assertion id from the server.
Requests a legacy session token from the server. This is used for legacy features that do not support the new token flow.
Set the auto login feature to be enabled or disabled. If biometric login is enabled, the auto login flag can be set to true or false. else it will be set to false. If biometric login is not enabled, the auto login flag will always be false.
Prompts the user for biometric confirmation and, on success, saves the biometric token for future use
Starts the login flow. This will open the web login screen and return a LoginComplete object when the user has successfully logged in.
This method should only be used by applications that uses custom login flows. Contact the SDK team for more information on how to use this method.
Starts the signup flow. This will open the web signup screen and return a LoginComplete object when the user has successfully signed up.