Learn R Programming

plug (version 0.2.0)

plug_store_credentials: Store user credentials securely for Plug API

Description

This function securely stores the global username and password required to authenticate with the Plug application. Any cached token is discarded, so the next request authenticates with the new credentials.

Usage

plug_store_credentials(username, password)

Value

No return value. The credentials are securely stored.

Arguments

username

The username for the Plug.

password

The password for the Plug.

Examples

Run this code
# Use a temporary, in-memory keyring so the example does not touch
# the credentials stored in the system keyring
old <- options(keyring_backend = "env")

plug_store_credentials("myusername", "mypassword")
plug_clear_credentials()

options(old)

Run the code above in your browser using DataLab