#4221 Add project connector api endpoint
Merged by pingou. Opened by fbo.
fbo/pagure add_project_connector_api_endpoint  into  master

Download 4221.patch

This endpoint aims to provide a get access to connector
tokens that are:
- project hook token
- project's user (caller) API token

I call them connector data as those tokens are the
mandatory data an application should have to verify project
events received via the Web hooks but also to perform actions
via the API to a given project.

The endpoint is only available to project's owner and admin
users with a 'modify_project' ACL token.

Thanks to this endpoint, a user (or an application) added as
admin on one or more projects, and via its user token, would
be able to read connector data on those projects and then
received events and perform API call on those same projects.

:thumbsup:

I'm not sure why success wasn't reported back, but the job passed in Jenkins.

1 new commit added

  • Api: project connector endpoint: complete returned data

Thanks Neal for your review, I have added the token expiration status to the returned data in that second commit.

:thumbsup:

The API tokens of the user making the request ?

And the expiration now :)

Should we check the number of tokens returned?

1 new commit added

  • Fix docstring of the connector api endpoint

rebased onto dfb30c467d6df17687d0c7a7ab3d943b1ca10636

Pull-Request has been merged by pingou

Metadata