Get or set various authorization options. If called without an argument, then these functions return the current setting for the requested option (which can be NULL if the option has not been set). To clear the setting, pass NULL as an argument.

cja_auth_with sets the type of authorization for the session. This is used as the default by cja_auth() when no specific option is given.

cja_auth_path sets the file path for the cached authorization token. It should be a directory, rather than a filename. If this option is not set, the current working directory is used instead.

cja_auth_name sets the file name for the cached authorization token. If this option is not set, the default filename is cja_auth.rds

cja_auth_with(type)

cja_auth_path(path)

cja_auth_name(name)

Arguments

type

The authorization type: 'oauth' or 'jwt'

path

The location for the cached authorization token. It should be a directory, rather than a filename. If this option is not set, the current working directory is used instead. If the location does not exist, it will be created the first time a token is cached.

name

The filename, such as cja_auth.rds for the cached authorization token file. The file is stored as an RDS file, but there is no requirement for the .rds file extension. .rds is not appended automatically.

Value

The option value, invisibly

See also