]> git.koha-community.org Git - koha.git/commit
Bug 20568: API keys management in interface
authorJulian Maurice <julian.maurice@biblibre.com>
Mon, 23 Mar 2015 19:14:23 +0000 (20:14 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 9 May 2018 15:55:58 +0000 (12:55 -0300)
commit3aa102d0c35058bc6f2350d97e3da11815d368f1
tree29f425ecda686b735695384a62f976443d7984cb
parent462dc01cee6f8edc76c686d36aac66ef90a5aad4
Bug 20568: API keys management in interface

This introduces the concept of API keys for use in the new REST API.
A key is a string of 32 alphanumerical characters (32 is purely
arbitrary, it can be changed easily).
A user can have multiple keys (unlimited at the moment)
Keys can be generated automatically, and then we have the possibility to
delete or revoke each one individually.

Test plan:
1/ Go to staff interface
2/ Go to a borrower page
3/ In toolbar, click on More -> Manage API keys
4/ Click on "Generate new key" multiple times, check that they are
   correctly displayed under the button, and they are active by default
5/ Revoke some keys, check that they are not active anymore
6/ Delete some keys, check that they disappear from table
7/ Go to opac interface, log in
8/ In your user account pages, you now have a new tab to the left "your
   API keys". Click on it.
9/ Repeat steps 4-6

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/ApiKey.pm [new file with mode: 0644]
Koha/ApiKeys.pm [new file with mode: 0644]
Koha/Schema/Result/ApiKey.pm [new file with mode: 0644]
installer/data/mysql/kohastructure.sql
koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/modules/members/apikeys.tt [new file with mode: 0644]
koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-apikeys.tt [new file with mode: 0644]
members/apikeys.pl [new file with mode: 0755]
opac/opac-apikeys.pl [new file with mode: 0755]