0
我想從angularjs網頁登錄到Domino服務器。頁面本身駐留在我想要驗證的數據庫中,所以它不是很遠。 這是我的代碼:如何使用angularjs在Domino服務器上登錄?
return $http({
url: 'http://servername/names.nsf?login',
data: {
'username': 'myusername',
'password': 'whateverpassword',
'redirectto': '/path_to_db.nsf/$icon'
},
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'X-Requested-With': 'XMLHttpRequest'
}
})
.then(loginComplete)
.catch(loginFailed);
我得到的回報是一個HTTP響應200。當我做一個手動登錄我得到一個HTTP 302和DomAuthSessId餅乾。所以請求的行爲有所不同。當我發佈帖子時,會有一個SessionID cookie可用,所以應該與服務器進行會話。關於我在這裏忘了什麼的任何想法?提前致謝!
也許我應該概括我想要實現起來:
- 從不同的來源獲取用戶名和密碼,
- 使用它們來登錄並獲得與Domino服務器的會話而不提示。
最終我們將使用SAML進行單點登錄,但我們仍然在Domino 8.5.3上,所以目前這不是一個選項。
關鍵是:我不希望用戶手動驗證。有一批讀者參與其中,誰給了我用戶名,並從那裏我想與服務器自動驗證。 –