Worklight Studio 6.0.0.2; Worklight Server 6.0.0; Android의 하이브리드 앱
최근에 Worklight Adapter 기반 인증에서 또 다른 이상한 동작을 발견했습니다. 처음에 인증을 통과 한 다음 백그라운드에서 앱을 실행하는 경우 아래 # 7 단계가 발생하지 않습니다 (다음 7 단계는 Anton의 한 답변에서 복사 한 것입니다). Worklight 세션이 만료 된 후 앱을 포 그라운드로 되돌립니다. 이때 첫 번째 요청은 WL 서버로 재 인증시 응답을받지 못합니다.
Android 로그 :
D/NONE(19720): Request [https://xxx/android/composite]
D/NONE(19720): auth required: true
D/NONE(19720): re-submit custom auth
D/NONE(19720): Request [https://xxx/../../invoke]
D/NONE(19720): auth required: false
D/NONE(19720): response.responseJSON: {"isSuccessful":true,"authRequired":false}
D/NONE(19720): Request [https://xxx/android/composite]
보다? "복합"요청의 응답을받지 못합니다. 사실, 어떤 경우에는 다른 # 1 요청에 대한 응답도받지 못해 앱을 진행할 수 없습니다. 이 경우 두 개의 동일한 요청을 보내야합니다. 하나는 응답없이 사라집니다. 다른 하나는 잘 작동합니다.
어떤 생각? 미리 감사드립니다.
업데이트 :
PC 브라우저를 통해 # 6 단계의 요청에 403 오류가 있음을 발견했습니다 ...;
내 일부 코드 :
pushAppRealmChallengeHandler.handleChallenge = function(response){
var authRequired = response.responseJSON.authRequired;
var loginForm = registry.byId("loginPage");
if(authRequired){
WL.Logger.debug("auth required: " + authRequired);
if(response.responseJSON.errorMessage != null){
mBase.showProgressIndicator();
loginForm.hintNode.innerHTML = response.responseJSON.errorMessage;
loginForm.usernameNode.domNode.focus();
}else{
WL.Logger.debug("re-submit custom auth");
pushAppRealmChallengeHandler.doCustomAuth(loginForm.usernameNode.get('value'), loginForm.passwordNode.get('value'));
}
}else if(authRequired == false){
WL.Logger.debug("auth required: " + authRequired);
if(!pushAppRealmChallengeHandler._authFinished){
pushAppRealmChallengeHandler._authFinished = true;
...
pushAppRealmChallengeHandler.submitSuccess();
}else {
WL.Logger.debug("response.responseJSON: " + dojo.toJson(response.responseJSON));
pushAppRealmChallengeHandler.submitSuccess();
}
}
};
pushAppRealmChallengeHandler.doCustomAuth = function(userName, password) {
var loginForm = registry.byId("loginPage");
var invocationData = {
adapter : "AuthAdapter",
procedure : "submitAuthentication",
parameters : [Base64.encode(userName), Base64.encode(password), userName, pushAppRealmChallengeHandler._authFinished]
};
pushAppRealmChallengeHandler.submitAdapterAuthentication(invocationData, {
onFailure : function() {
mBase.showProgressIndicator();
loginForm.hintNode.innerHTML = Messages.WLErrMsg;//netErrMsg;
}
});
};
우리 팀은 mobileSecurityTest의 구성을 변경하여이 문제를 해결했습니다. 그 이유는 테스트 영역 중 하나가 응답을 제공하지 않기 때문입니다. 그래서 우리 팀은 mobileSecurityTest에 속하는 테스트 영역을 제거합니다.
낡은
<mobileSecurityTest name="PushApplication-strong-mobile-securityTest">
<testUser realm="PushAppRealm"/>
<testDeviceId provisioningType="none"/>
</mobileSecurityTest>
새로운
<customSecurityTest name="PushApplication-strong-mobile-securityTest">
<test realm="wl_remoteDisableRealm"/>
<test realm="PushAppRealm" isInternalUserID="true"/>
<test realm="wl_deviceNoProvisioningRealm" isInternalDeviceID="true" />
</customSecurityTest>
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다