EVOLUTION-MANAGER
Edit File: Token-class.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: OAuth token objects.</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for Token-class {httr}"><tr><td>Token-class {httr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>OAuth token objects.</h2> <h3>Description</h3> <p>These objects represent the complete set of data needed for OAuth access: an app, an endpoint, cached credentials and parameters. They should be created through their constructor functions <code><a href="oauth1.0_token.html">oauth1.0_token()</a></code> and <code><a href="oauth2.0_token.html">oauth2.0_token()</a></code>. </p> <h3>Format</h3> <p>An R6 class object. </p> <h3>Methods</h3> <ul> <li> <p><code>cache()</code>: caches token to disk </p> </li> <li> <p><code>sign(method, url)</code>: returns list of url and config </p> </li> <li> <p><code>refresh()</code>: refresh access token (if possible) </p> </li> <li> <p><code>validate()</code>: TRUE if the token is still valid, FALSE otherwise </p> </li></ul> <h3>Caching</h3> <p>OAuth tokens are cached on disk in a file called <code>.httr-oauth</code> saved in the current working directory. Caching is enabled if: </p> <ul> <li><p> The session is interactive, and the user agrees to it, OR </p> </li> <li><p> The <code>.httr-oauth</code> file is already present, OR </p> </li> <li> <p><code>getOption("httr_oauth_cache")</code> is <code>TRUE</code> </p> </li></ul> <p>You can suppress caching by setting the <code>httr_oauth_cache</code> option to <code>FALSE</code>. </p> <p>Tokens are cached based on their endpoint and parameters. </p> <p>The cache file should not be included in source code control or R packages (because it contains private information), so httr will automatically add the appropriate entries to <code>.gitignore</code> and <code>.Rbuildignore</code> if needed. </p> <hr /><div style="text-align: center;">[Package <em>httr</em> version 1.4.2 <a href="00Index.html">Index</a>]</div> </body></html>