플래시에서 http-auth 방식 인증처리방법

플래시에서 http-auth 방식 인증처리방법

// http BASIC 인증 코드
http://www.abdulqabiz.com/blog/archives/flash_and_actionscript/http_authentica.php

var request:URLRequest = new URLRequest();

//call listsubs method of Bloglines
request.url = "";

var credentials:String = Base64.encode(email + ":" + password);
//create HTTP Auth request header
var authHeader:URLRequestHeader = new URLRequestHeader("Authorization","Basic " + credentials);
//add the header to request
request.requestHeaders.push(authHeader);
//make the request.
loader.load(request);
<span class="Apple-style-span" style="font-family: Dotum; line-height: 19px; white-space: normal;"><strong style="padding-bottom: 0pt; padding-left: 0pt; padding-right: 7px; padding-top: 0pt;">[출처]</strong> <a href="http://blog.naver.com/blumetal/80036611785" target="_blank">as3에서 HTTP Basic auth 처리</a><span style="padding-bottom: 0pt; padding-left: 5px; padding-right: 7px; padding-top: 0pt;">|</span><strong style="padding-bottom: 0pt; padding-left: 0pt; padding-right: 7px; padding-top: 0pt;">작성자</strong> <a href="http://blog.naver.com/blumetal" target="_blank">블루메탈</a></span>

Leave a Reply

Your email address will not be published. Required fields are marked *