I am working on building an API Based Architecture on PHP.
I want to make sure that the client that attempts to consume my API using a distinct API key, is the authorized client. For example, API Key "ABCD1234" is assigned to domain "example.com". If domain "fraud.com" tries to use this API Key, they should NOT be able to consume the API. How do I implement this check on the API end?
Based on what I have seen so far, it is very easy for a client to pass a referrer header to "fake" it's true identity.
Also I faintly remember when Google Maps had first launched their API, they implemented a similar technique where only the authorized URL could use the corresponding API Key. So this does not seem out of the realm of possibility.
Any help/direction would be appreciated.
Thank you,
-Saf