Skip to content

Client Access Resource

nov edited this page Oct 3, 2014 · 2 revisions

Access Token Instance

If you obtain the instance via client.access_token! (Obtain Access Token), you already has Rack::OAuth2::AccessToken instance.

Otherwise, you'll need instantiate it from stringified access token.

Bearer Token

access_token = Rack::OAuth2::AccessToken::Bearer.new(
  access_token: 'a105a71a4071f7faa3b...'
)

MAC Token

Since MAC spec is dead before standardised, you won't need to use this type of tokens..

Resource Request

access_token.get 'https://resource.server.example.com/me'

access_token delegates get, post, put and delete to HTTPClient instance. Read HTTPClient documents for details. https://github.com/nahi/httpclient

Clone this wiki locally