Lucifer wrote:I would suggest, tank, that we give serious thought to hacking mediawiki and phpbb to use this same authentication method.
I'd like to see all 3 (resource uploading included) use the same distributed auth as Arma. But even then, we still have the question of what to do with the existing user accounts.
Lucifer wrote:403 means forbidden, and is pretty generic. It's probably our best bet. If we don't want to provide a public reason for why the request failed, we can use a 404 instead, but we probably want to provide a reason.
RFC2616 wrote:
10.4.4 403 Forbidden
The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it SHOULD describe the reason for the refusal in the entity. If the server does not wish to make this information available to the client, the status code 404 (Not Found) can be used instead.
Fact is, authorization WILL help the request, so 403 can't be used in a standards compliant way. 400 or 404 should mean this method is not supported, so Arma would then try XMPP or whatever else.
RFC2616 wrote:10.4.5 404 Not Found
The server has not found anything matching the Request-URI
The Authorization header is not the Request-URI, sorry.
Tank Program wrote:z-man wrote:Yeah

Except that would require maintaining two copies of the software in two places it doesn't really belong.

Note we have $_SERVER['HTTP_HOST'], so you could setup one copy of it and use Apache config to share it across the vhosts.
Proposal on returned content format:
<fail/success> <reason code> <english reason>
so:
1 PASSWORD_OK "Password is correct."
0 PASSWORD_FAIL "Wrong password."