Save installation ids to a cache and fetch them per project

We need an installation id to do most things on a project for an
integration. This can not be handled statically, but you can find the
installation id in incoming events.

We record the incoming installation id for a project on each event that
is received. Then later we can lookup this information and use it to
fetch the correct installation key.

As part of this we allow a fallback from installation to api_key
authentication to anonymous. If we don't want to scope to a project or
integrations are not supported we can use api_key authentication for
those operations, or try and do them anonymously if nothing is
available.

Change-Id: Ic23eef134c3854e6c06d077a2a65c1d37f1a4cc1
Signed-off-by: Jamie Lennox <jamielennox@gmail.com>
1 file changed