stable

Clone or download

Read-only

Expiration date can be set by REST

This is part of story #13667 have an expiration date associated to API AccessKey The REST route POST /access_keys allows now an expiration_date parameter to set an expiration date for a newly created API key. Example of JSON content: { "description": "This is my API key", "expiration_date": "2019-08-07T10:15:57+02:00" } The expiration_date is optional. If provided, it must be formatted as an ISO-8601 date. In addition, you cannot create an already expired access key. Change-Id: Ida4dbadf2191f492c7ad1744f660d801f63b3e0b

Modified Files

Name
A src/common/User/AccessKey/AccessKeyAlreadyExpiredException.php +29 −0 Go to diff View file
M src/common/User/AccessKey/AccessKeyCreationController.php +3 −2 Go to diff View file
M src/common/User/AccessKey/AccessKeyCreator.php +17 −3 Go to diff View file
M src/common/User/AccessKey/AccessKeyDAO.php +6 −5 Go to diff View file
A src/common/User/AccessKey/REST/AccessKeyPOSTRepresentation.php +35 −0 Go to diff View file
M src/common/User/AccessKey/REST/AccessKeyResource.php +36 −4 Go to diff View file
M tests/phpunit/common/User/AccessKey/AccessKeyCreatorTest.php +78 −10 Go to diff View file
M tests/rest/tests/AccessKeyTest.php +44 −3 Go to diff View file