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.

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

if (FALSE) { # interactive()
client <- hb_client()
hb_check_credentials(client)
}