Skip to contents

Exchanges the client's credentials for a token, which is the cheapest way to find out whether they work. For an API-token client this fetches a base token, and so also confirms the token is valid for that base; for a username/password client it fetches an account token and then drops any cached base token, so that the next base call fetches a new one.

Usage

hb_check_credentials(client, ...)

Arguments

client

A harbour_client.

...

These dots are for future extensions and must be empty.

Value

The client, invisibly. Errors with a harbour_error_auth condition if the credentials are rejected.

Details

Unlike hb_ping(), which only proves the server is up, this proves the credentials are usable.

Examples

# needs a SeaTable server and an API token
if (FALSE) { # \dontrun{
client <- hb_client()
hb_check_credentials(client)
} # }