News for hackers. Stuff that matters.
Re:A Modest Proposal for Improving Website Authentication by StavrosK on Tuesday May 21, 2013 @09:11AM (#5743367)
Hmm, as a rule, I prefer centralized logins (Mozilla Persona, in particular), but this could be a nice way to standardize logins. However, the fact that it should be implemented as an HTTP header strikes me as out-of-place, since I think it would be much better as something more standard, like:

<form method="POST" action="/login/"> <input type="credentials" elements="email,password" /> </form>

This is pretty much exactly the same as the proposal, only it's in HTML rather than HTTP.

Re:A Modest Proposal for Improving Website Authentication by da_n on Tuesday May 21, 2013 @09:31AM (#5743496)
Why not have both? If the browser is capable (theoretically) of handling logins from an http header this would be awesome in my opinion. Personally I would much rather have the browser be responsible for logins after seeing more and more forms use funky JavaScript which breaks standard functionality. Persona could just be built-in or a plugin, you could just say 'log in with Persona'. You could have account profiles, with varying levels of privacy, you could maybe allow the end-user to decide if 2-factor auth can be used where previously not available, there are a lot of possibilites to me and it would standardise the process. Of course, this may just be pie in the sky but overall I agree with the author on this.
Re:A Modest Proposal for Improving Website Authentication by StavrosK on Tuesday May 21, 2013 @09:42AM (#5743550)
We're agreeing on standardizing logins, my comment was on the implementation. The only part of your comment about that that I can see is the first sentence ("Why not have both?"), so I will answer it: It's more complicated.
Re:A Modest Proposal for Improving Website Authentication by kijin on Tuesday May 21, 2013 @09:22AM (#5743425)
That will only work if every page contains a login form. Many websites prefer to put the login form on its own page.

Introducing new input elements and HTML semantics will also require a lot of code to be rewritten, whereas a custom header can be implemented with a one-liner that you put in your .htaccess or webserver config file, or a turnkey plugin for most content management systems. The goal is to produce something that can be grafted onto virtually every existing website with the absolute least amount of code change.

Re:A Modest Proposal for Improving Website Authentication by StavrosK on Tuesday May 21, 2013 @09:31AM (#5743492)
I don't see how adding one to three lines of HTML is harder than adding a custom header, and I certainly don't know what you mean by "will require a lot of code to be rewritten". You stick it in your templates.

If anything, a custom header is worse because it's too separated from the actual URL. I can't automatically update that file if I change the login URL, but I can if it's in the template.

Re:A Modest Proposal for Improving Website Authentication by kijin on Tuesday May 21, 2013 @09:53AM (#5743604)
At the very least, you might need to edit the script that handles the POST request, in addition to the login form template. We're programmers so it sounds trivial to us. But it's already way too much for everyone else, because the average website owner will not spend any time trying to locate the POST request handler in the spaghetti PHP that his nephew wrote 5 years ago (and who knows what else will break if he edits that file).

I think a common login interface is important enough that we can't wait for the majority of websites to fix even a few of lines of code. (Does WordPress even allow plugins to modify the field names on the login page? It certainly allows them to add custom headers.) Copying and pasting a "Header add" one-liner in your .htaccess file requires 10x less programming skill and carries 10x less risk than rummaging around in a bowl of pasta, so it's much more likely to see widespread adoption. We could even open a service that crawls a given website and suggests reasonable values to put in their .htaccess files, for people who want the shiny new Login button to work in their websites.

I also don't see how it would be any more difficult for experienced programmers to update a header than it would be to update a template.

Re:A Modest Proposal for Improving Website Authentication by da_n on Tuesday May 21, 2013 @09:36AM (#5743530)
You wouldn't need to have the header point to a log in page though, you would just have the server handle the post request sent from the browser (or plugin).
Re:A Modest Proposal for Improving Website Authentication by StavrosK on Tuesday May 21, 2013 @09:41AM (#5743545)
Yeah, by "login URL" I mean the URL that handles the POST, the one that's in the header.
Re:A Modest Proposal for Improving Website Authentication by da_n on Tuesday May 21, 2013 @10:10AM (#5743691)
Right I see what you're saying, looks like I misread the article a bit. For me it would be an ideal implementation if there could also be some callback functionality, that way it doesn't just have to redirect to a login url the logic can be handled natively (wrong password > try again, success > reload page etc). Even better, instead of pointing to a login page, you could specify a different auth scheme and just point to a JSON or XML file with the various field etc. Whichever way, it isn't going to be utterly trivial I will agree on that.