Calling firebaseContext() with a declarative policy both parses and enforces context. Honors the same environment variables that Cloud Functions for Firebase does to mock token validation in preproduction environmets.
Calling firebaseContext() with a policy callback parses context but delegates enforcement. To control the message sent to a user, throw UserFacingError. For security reasons, other error types will be returned as a 500 "internal error".
Calling firebaseContext() without any parameters merely parses firebase context data. It does not do any validation on the data found. To do automatic validation, pass either an options object or function for freeform validation.