Skip to contents

Return information about the logged in (current) user

Usage

auth_me(dry_run = FALSE, includes = NULL, realm = "counts")

Arguments

dry_run

if TRUE, the call is printed to the console instead of being sent to the API, which is useful for debugging

includes

a character vector of relationships to include in the response these are data from other tables or resources

realm

Character. The realm to query (default "counts").

Value

list containing user information

Details

This function returns information about the current user. This function is useful for checking if the user is logged in and for getting information about the user.

If desired the includes argument can be used to include additional information about the user. For example, to include the user's roles, the includes argument should be set to "roles". Options include:

  • project

  • roles

  • relatedAccounts

See also

user_id(), project_id(), and is_auth() for quick identity checks, auth_login() to authenticate

Examples

if (FALSE) { # \dontrun{
# Mimic package implementation
auth_me()

# Include additional information about the user
auth_me(includes = c("roles", "project", "relatedAccounts"))

# Query telemetry realm
auth_me(realm = "telemetry")
} # }