Form-based authentication in native Windows 8 applications
This tutorial illustrates the native Windows 8 Universal client-side authentication components for form-based authentication.
Prerequisite: Make sure that you read Form-based authentication first.
This tutorial covers the following topics:
Creating the client-side authentication components
Create a native Windows 8 Universal application and add the MobileFirst native APIs as explained in the documentation.
FormChallengeHandler class as a subclass of
FormChallengeHandler class must implement the
isCustomResponse method checks every custom response received from MobileFirst Server to verify whether this is the expected challenge.
handleChallenge method is called after the
isCustomResponse method returns
Within this method, present your login form. Different approaches are available.
From the login form , credentials are passed to the
FormChallengeHandler class. Use the
submitLoginForm() method to send input data to the authenticator.
MainPage class, connect to MobileFirst Server, register your
challengeHandler and invoke the protected adapter procedure.
The procedure invocation triggers MobileFirst Server to send a challenge that will trigger our challenge handler.
Because the native API not protected by a defined security test, no login form is presented during server connection.
Invoke the protected adapter procedure. The login form is presented by the
Click to download the MobileFirst project.
Click to download the Native project.
FormBasedAuthproject contains a MobileFirst native API that you can deploy to your MobileFirst server.
FormBasedAuthWin8project contains a native Windows 8 Universal application that uses a MobileFirst native API library.
- Make sure to update the
wlclient.propertiesfile in the native project with the relevant server settings.