Add security features to the api.

Add Secret model and hook to verify if request should be handled