[PATCH 4/6] Create the /api/ page providing the API token and information
bkabrda at redhat.com
Tue Jan 8 07:45:17 UTC 2013
----- Original Message -----
> The API page aims at providing information about the API itself and
> how to use it.
> Additionally, if you are logged-in, this page gives you your own
> API token (needed to call the API), its expiration date (as each
> token is valid only 30 days) and a way to generate a new token.
thanks for the patches. The first three are ok and I'll apply them.
As for the token authentication, I'm not generally opposed to that, but:
1) the alembic migration fails with
'Cannot add a NOT NULL column with default value NULL u'ALTER TABLE user ADD COLUMN api_token'
so the migration must contain a sane value for already existing users. Also the migration should create an expired token, I think. Just to make sure we're safe with the auto-inserted empty token...
2) What exactly do we need the token for? Anything else than user comfort? If not, I think that a cookie based permanent login would be a good standard solution for this problem.
Bohuslav "Slavek" Kabrda.
More information about the copr-devel