Learn R Programming

googleAuthR (version 2.0.2)

should_skip_token_checks: Determines whether token presence and validity checks should be skipped.

Description

Skipping checks is useful in certain special cases, such as testing. Tests might rely on mocked API responses or fake API implementations, which don't require a valid token. It wouldn't make sense to demand a valid token in that context.

Usage

should_skip_token_checks()

Arguments

Value

boolean

Details

googleAuthR uses this function to know when the execution context is such that token checks should be skipped. This is ultimately determined by the value of the googleAuthR.skip_token_checks boolean option. Users or consumer libraries can set this option to signal that authentication is not needed.

In addition, this function detects the use of httptest::with_mock_API and skips token checks in that case as well.

See Also

Other authentication functions: gar_attach_auto_auth(), gar_auth(), gar_auth_service(), gar_auto_auth(), gar_gce_auth(), get_google_token(), token_exists()