oauth2.0_token

0th

Percentile

Generate an oauth2.0 token.

This is the final object in the OAuth dance - it encapsulates the app, the endpoint, other parameters and the received credentials. It is a reference class so that it can be seamlessly updated (e.g. using $refresh()) when access expires.

Usage
oauth2.0_token(endpoint, app, scope = NULL, type = NULL,
  use_oob = getOption("httr_oob_default"), as_header = TRUE,
  cache = getOption("httr_oauth_cache"))
Arguments
endpoint
An OAuth endpoint, created by oauth_endpoint
app
An OAuth consumer application, created by oauth_app
scope
a character vector of scopes to request.
type
content type used to override incorrect server response
use_oob
if FALSE, use a local webserver for the OAuth dance. Otherwise, provide a URL to the user and prompt for a validation code. Defaults to the of the "httr_oob_default" default, or TRUE if httpuv is not installed.
as_header
If TRUE, the default, sends oauth in bearer header. If FALSE, adds as parameter to url.
cache
A logical value or a string. TRUE means to cache using the default cache file .oauth-httr, FALSE means don't cache, and NA means to guess using some sensible heuristics. A string mean use the specified p
Details

See Token for full details about the token object, and the caching policies used to store credentials across sessions.

Value

  • A Token2.0 reference class (RC) object.

See Also

Other OAuth: oauth1.0_token; oauth_app; oauth_endpoint; oauth_service_token

Aliases
  • oauth2.0_token
Documentation reproduced from package httr, version 0.6.1, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.