security decorator for use it with Google Cloud Endpoints