묻고답하기
xe로 이런 로그인 페이지 만드는 방법이 있나요?
2011.01.27 11:08
이러한 로그인 페이지를 XE를 통해 만들 수 있나요?
XE가 안된다면 제로보드 4에서는 가능한가요?
XE자체적인 질문이 아니라 죄송합니다. 가능하면 XE회원관리 시스템과 연동되면 여러모로 이점이 있을거 같습니다.
그리고 무엇보다 제가 아는게 없습니다ㅜㅜ
----------------------------------------------------------------------------------------------------------
원래 질문은 스마트폰 앱에 연동할 HTTP request 페이지를 만드는 것이었습니다..
(http://allseeing-i.com/top_secret/)
출처: http://allseeing-i.com/ASIHTTPRequest/How-to-use
Handling HTTP authentication
If you're connecting to a server that requires authentication, you
might want to take a look at this flowchart that shows how ASIHTTPRequest finds
and applies credentials to requests.
Specifying a username and password to use in the URL
NSURL *url = [NSURL URLWithString:@"http://username:password@allseeing-i.com/top_secret/"];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
Setting a username and password to use on the request
NSURL *url = [NSURL URLWithString:@"http://allseeing-i.com/top_secret/"];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request
setUsername:@"username"];
[request
setPassword:@"password"];
Storing credentials in the keychain
If you turn
on keychainPersistence, any valid username and password supplied will be
stored in the keychain. Subsequent requests will reuse the username and password
from the keychain, even if you quit and relaunch the application.
NSURL *url = [NSURL URLWithString:@"http://allseeing-i.com/top_secret/"];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request
setUseKeychainPersistence:YES];
[request
setUsername:@"username"];
[request
setPassword:@"password"];
If you want to use
the keychain but would rather manage it yourself, you might find the class
methods relating to the keychain in ASIHTTPRequest.h helpful.
Storing credentials in the session
If useSessionPersistence is turned on (it is by default),
ASIHTTPRequest stores credentials in memory and can re-use them for subsequent
requests.
NSURL *url = [NSURL URLWithString:@"http://allseeing-i.com/top_secret/"];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request
setUsername:@"username"];
[request
setPassword:@"password"];
[request
setUseSessionPersistence:YES]; //Shouldn't be needed as this is the default
//Should reuse our username and password
request = [ASIHTTPRequest requestWithURL:url];
NTLM authentication
To authenticate with
a Windows server that uses the NTLM scheme, you also need to specify the domain
you are authenticating against.
NSURL *url = [NSURL URLWithString:@"http://my.windows.server/top_secret/"];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request
setUsername:@"username"];
[request
setPassword:@"password"];
[request
setDomain:@"my-domain"];
댓글 1
-
DynamicLaser
2011.01.27 20:22
HTTP용 로그인소스는 왠만한 PHP책들에도 자세히 소개되어있습니다.. 지금 제가 가진 책에 자세히는 모르겠지만 꼼꼼히는 나와있네요 -
cycix
2011.01.29 18:17
서버에서 http인증을 지원해주어야 가능한 기술인데 지원 안해줄걸요...