I am looking at some example code and can’t figure out how authentication is done.
Any ideas how this simple code authenticates users?
Thanks,
<script type='text/javascript'>
//<![CDATA[
window._auth_token_name = "authenticity_token";
window._auth_token = "k0d6elNSSvaejR63eiqcZrv3O8fU/6VL2kvoqmpdO6k=";
//]]>
</script>
</head>
<body>
<div id="messages">
<div id="info"></div>
<div id="error"></div>
</div>
<div id="header">
</div>
<div id="center">
<table>
<form action="/admin/login" class="new_user" id="new_user" method="post"><div style="margin:0;padding:0;display:inline"><input name="authenticity_token" type="hidden" value="k0d6elNSSvaejR63eiqcZrv3O8fU/6VL2kvoqmpdO6k=" /></div>
<tr>
<td>Username</td>
<td><input id="user_username" name="user[username]" size="30" type="text" /></td>
</tr>
<tr>
<td>Password</td>
<td><input id="user_password" name="user[password]" size="30" type="password" />
</tr>
<tr>
<td colspan="2">
<input id="user_submit" name="commit" type="submit" value="Log in" />
</td>
</tr>
</form>
</table>
</div>
that simple code does not authenticate anything, It’s simply a html page with a form to submit. The authentication process takes place on a server at this route:
/admin/loginthe server could be anything.. php, ruby on rails etc