stable

Clone or download

Read-only

Access keys can be used to access the REST API as an authenticated user

On your personnal account you can generate an access key then use it to access the REST API. To authenticate with it, send a request with an header X-Auth-AccessKey, for example: curl -H 'X-Auth-AccessKey: <my_key>' https://tuleap.example.com/api/projects The last usage date of the key is updated each time an authenticated call is done with it. This is part of story #12266: use an API key rather than a login / password Change-Id: I452d075e02fad0f0e8f5fb035cde22d4735c44ad

Modified Files

Name
M site-content/fr_FR/LC_MESSAGES/tuleap-core.po +0 −7 Go to diff View file
M site-content/tuleap-core.pot +0 −5 Go to diff View file
M src/common/REST/BasicAuthentication.class.php +7 −7 Go to diff View file
R src/common/REST/TokenIsAllowed.class.php Go to diff View file
R src/common/REST/TokenAuthentication.class.php Go to diff View file
M src/common/REST/UserManager.class.php +85 −18 Go to diff View file
D src/common/REST/autoload.php +0 −25 Go to diff View file
M src/common/User/AccessKey/AccessKey.php +34 −2 Go to diff View file
M src/common/User/AccessKey/AccessKeyDAO.php +18 −0 Go to diff View file
A src/common/User/AccessKey/AccessKeyMatchingUnknownUserException.php +29 −0 Go to diff View file
A src/common/User/AccessKey/AccessKeyNotFoundException.php +29 −0 Go to diff View file
M src/common/User/AccessKey/AccessKeyVerificationStringHasher.php +8 −0 Go to diff View file
A src/common/User/AccessKey/AccessKeyVerifier.php +76 −0 Go to diff View file
A src/common/User/AccessKey/InvalidAccessKeyException.php +29 −0 Go to diff View file
A src/common/User/AccessKey/InvalidIdentifierFormatException.php +29 −0 Go to diff View file
M src/templates/user/access-keys.mustache +0 −5 Go to diff View file
M src/www/api/index.php +5 −2 Go to diff View file
M tests/phpunit/common/User/AccessKey/AccessKeyTest.php +20 −0 Go to diff View file
M tests/phpunit/common/User/AccessKey/AccessKeyVerificationStringHasherTest.php +12 −0 Go to diff View file
A tests/phpunit/common/User/AccessKey/AccessKeyVerifierTest.php +119 −0 Go to diff View file
M tests/simpletest/common/REST/GateKeeperTest.php +3 −3 Go to diff View file