티스토리 뷰
아래와 같이 Exchange에서 제공하는 OWA 사이트를 SSO처리를 하기 위해 아래와 같이 로그인을 해줄 수 있다. 그렇지만 사전에 ID, PW를 알아야지만 SSO를 해줘야 하는 단점이 있다.
1 2 3 | $.post( '/owa/auth.owa' , {destination: "https://owa.server.net/owa/" , flags:4, forcedownlevel:0, username: "[로그온계정]" , password: "[패스둬드]" , isUtf8:1}, function (data){ }); |
[코드] Ajax를 이용한 로그인
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | function LoginToOWA (server,domain,username,password) { var p = {destination: 'https://' + server + '/owa/' ,flags: '4' ,forcedownlevel: '0' ,trusted: '0' ,isutf8: '1' ,username:domain + '\\' + username,password:password}; var myForm = document.createElement( "form" ); myForm.method= "post" ; myForm.action = url ; for ( var k in p) { var myInput = document.createElement( "input" ) ; myInput.setAttribute( "name" , k) ; myInput.setAttribute( "value" , p[k]); myForm.appendChild(myInput) ; } document.body.appendChild(myForm) ; myForm.submit() ; document.body.removeChild(myForm) ; } |
[코드] Form submit를 이용한 로그인
'Exchange' 카테고리의 다른 글
Exchange의 Item에 대한 키값 - ItemId, EntryId (0) | 2013.04.15 |
---|---|
Impersonation by Powershell (0) | 2013.04.15 |
Notifications - Push, Pull, Stream Notification #6 (0) | 2013.03.07 |
Notifications - Push, Pull, Stream Notification #5 (0) | 2013.03.07 |
Notifications - Push, Pull, Stream Notification #4 (2) | 2013.03.07 |