I have been searching for how we deal with authentication in REST and I find it difficult to understand why people do not consider authentication a resource too. When using a noun in stead of a nounified verb one should consider authenticating to
POST /secure-sessions
from which we would be redirected to:
GET /secure-sessions/{id}
All other secured resources would then be:
GET /secure-sessions/{id}/other-resources POST /secure-sessions/{id}/other-resources etc
If we logout we would do:
DELETE /secure-sessions/{id}
Why is this never considered? One could still use authorization headers and other token mechanisms.
Cheers
Tjerk