Hi I am using worklight 6.1 and WebSphere 8
I am getting following error
[ERROR ] FWLSE0059E: Login into realm 'WASLTPAModule' failed. SRVE0190E: File not found: /login.html. [project Streebo] SRVE0190E: File not found: /login.html [ERROR ] FWLSE0117E: Error code: 4, error description: AUTHENTICATION_ERROR, error message: An error occurred while performing authentication using loginModule WASLTPAModule, User Identity Not available. [project Streebo] [project Streebo] [WARNING ] SRVE0190E: File not found: /login.html
Here are the things what I did
authenticationConfig.xml
<mobileSecurityTest name="mobileTests">
<testAppAuthenticity/>
<testDeviceId provisioningType="none" />
<testUser realm="WASLTPARealm" />
</mobileSecurityTest>
<!-- For websphere -->
<realm name="WASLTPARealm" loginModule="WASLTPAModule"><className>com.worklight.core.auth.ext.WebSphereFormBasedAuthenticator</className>
<parameter name="login-page" value="/login.html"/>
<parameter name="error-page" value="/loginError.html"/>
</realm>
<!-- For websphere -->
<loginModule name="WASLTPAModule">
<className>com.worklight.core.auth.ext.WebSphereLoginModule</className>
</loginModule>
Adapter Entry
WASAuth.xml
<procedure name="getAuth" securityTest="mobileTests"/>
WASAuth-impl.js
function getAuth() {
return {'key1':'authh'};
}
Challenge Handler
var challengeHandler;
challengeHandler = WL.Client.createChallengeHandler('WASLTPARealm');
initOptions.js
connectOnStartup : false,
main.js
function wlCommonInit(){
WL.Client.connect({
onSuccess: onConnectSuccess,
onFailure: onConnectFailure
});
and its going in onSuccess
function onConnectSuccess() {
alert('on connect success in wlCommonInit() in main.js');
var invocationData = {
adapter : 'WASAuth',
procedure : 'getAuth',
parameters : []
};
var options = {
onSuccess : function(res) {
alert('procedure getAuth success with res: '+res);
},
onFailure : function() {
alert('procedure getAuth Failures');
}
};
WL.Client.invokeProcedure(invocationData, options);
};
So its coming in success function and when It calls adapter and following error comes
[ERROR ] FWLSE0059E: Login into realm 'WASLTPAModule' failed. SRVE0190E: File not found: /login.html. [project Streebo] SRVE0190E: File not found: /login.html [ERROR ] FWLSE0117E: Error code: 4, error description: AUTHENTICATION_ERROR, error message: An error occurred while performing authentication using loginModule WASLTPAModule, User Identity Not available. [project Streebo] [project Streebo] [WARNING ] SRVE0190E: File not found: /login.html
And I already have login.html and loginError.html in root folder of my war and also have login.html in conf
Please guide me to resolve this issue
Appreciate
For MobileFirst Platform v6.3
\MobileFirstServerConfig\servers\worklight\apps
Find the app that you are trying to test ltpa with.
Assuming the project name is FormBasedAuth. Then the corresponding war file is FormBasedAuth.war
Using WinRAR to open it.
Go to your studio workbench, in your project > expand server > expand conf > copy the login.html into the FormBasedAuth.war that is already opened in WinRAR
you could also create a loginError.html and put that into the FormBaseAuth.war
Make sure that you place FormBaseAuth.war back to \MobileFirstServerConfig\servers\worklight\apps
Now in the studio, server view > Stop the test server. Wait for it to stop. Start the test server again.
Now when you test, this error will be gone.
Similar procedure for the standalone server, just your war file might be different.
Please verify you have named the files login.html and loginError.html exactly. Please also verify you have placed these in the root of the war file that you have deployed to your server. You can expand the war file you have deployed to double check. Also make sure your login.html file has valid structure such as the example provided:
As well as the structure of your loginError.html page:
For more detailed instructions and troubleshooting please look at the following:
LTPA Training Module: http://public.dhe.ibm.com/software/mobile-solutions/worklight/docs/v610/08_06_WebSphere_LTPA_based_authentication.pdf
LTPA Infocenter Instructions https://pic.dhe.ibm.com/infocenter/wrklight/v6r1m0/index.jsp?topic=%2Fcom.ibm.worklight.deploy.doc%2Fadmin%2Ft_configuring_WL_LTPA_realm.html