Login form on my home page?

Hold the presses!!!

Ok, that went faster than I thought it would....

I've completed the sessions based login system. When you first login, it will notice you don't a sessions cookie, so it will send you to a login form which is an actual webpage (hard coded right now)... no more http auth is required. Your session will be stored for one hour after your last access, at which time you will be prompted with the login screen again. To logout within that hour, you click the logout button, or close all browsers.

As for http auth, it will still work for the api people. Rules for which one is used is as follows:

If the sessions cookie is sent, a session is required.
If the http authentication is sent, http auth is used
If neither is sent, the sessions login page will be displayed.

I'd figure I'd mention this before you guys get too carried away with your fancy login scripts :)

If you want to have a login form on your webpage, you just pass it to:
action=http://domain.com:2222/CMD_LOGIN
method=POST
username=username
password=password

voila!

Will be out for 1.12

John
 
Good job John! when will v1.12 be released?

##

will make a new thread with a couple of different styled logins for v1.12 in 5 :D

Chris
 
Hi guys,

1.12 should be out in a few days. I need to make sure that it works for everyone before I release it... if it doesn't, nobody will be able to log in at all... which would be a *bad* thing :D

Just a note that although http auth will still function, most browsers will not be able to use it via http://user:[email protected] because browsers check to see if it requires auth before actually using it... sessions don't require http auth because they are purely server side, so if you MUST use http auth, it can only be done by explicitly passing the encrypted user:Pass in the headers. Only people using the API really need to take note of this fact.

John
 
I havn't sent out the update to everyone yet so you guys can play around with our demo accounts on here just so you can get an idea of what it does.

http://www.directadmin.com:2222
login: demo_admin or demo_reseller or demo_user
pass: demo

edit: Ok, It needs a few things before I'm going to release it. The admin|user login system needs tweaking :)

John
 
Hi, would someone please post an example of the new meathode of adding a login form to a page?

===================================
action=http://domain.com:2222/CMD_LOGIN
method=POST
username=username
password=password
===================================

Thanks for your time and help -Jason
 
Just figured this out!

Code:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Direct Admin Login</title>
</head>

<body>
<form method="POST" action="http://yourdoman.com:2222/CMD_LOGIN">
<input type="text" name="username"/>
<input type="password" name="password" size="20"/>
 <input type="submit" value="go" name="submit"/>

</form>
</body>
</html>

-Jason:D
 
Last edited:
@ JDLITSON

here is an update to yours to just clean it up and make it neat. BTW, yours is the only one that worked for me.... Probably because the others were made before my version of DA ;)

<p><center>Web Control Panel Login</center>
<table align="center"><tr><td align="left">
<center><form method="POST" action="http://businessadvances.com:2222/CMD_LOGIN">
Username:<br><input type="text" name="username"/><br>
Password:<br><input type="password" name="password"/><br>
<b><input type="submit" value="Login" name="submit"/>

</form></center></td></tr></table>

</p>
 
Back
Top