Sha256: f66c6156f01643031bbc45b086b65a544c3acc000725f76fde3c67bab833f779

Contents?: true

Size: 1.16 KB

Versions: 12

Compression:

Stored size: 1.16 KB

Contents

<%= "# Refresh Tokens are not required in this application" if ::Opro.require_refresh_within.blank? %>

# Refresh Tokens

Refresh tokens can be used to refresh an expiring `access_token`. When you receive your initial `access_token` you will receive a `request_token` in the json as well as an `expires_in` value. The `expires_in` value marks the seconds that the current `access_token` is still valid. After this value reaches zero a client application will not be able to use the existing `access_token`.

## Refreshing an Access Token

If a token has expired or you simply wish to receive a new `access_token` you can send your `refresh_token` along with your `app_id` and `app_secret` to `/oauth/token` and your access_token will be refreshed.


    $ curl '<%= "#{request.base_url}/oauth/token?" %>?client_id=3234myClientId5678&client_secret=14321myClientSecret8765&refresh_token=4857goldfish827423'

You'll want to make sure to replace `client_id`, `client_secret`, and `refresh_token` with your values.

You should get back a response that looks like this

    $ {"access_token":"9693accessTokena7ca570bbaf","refresh_token":"3a3c129ad02b573de78e65af06c293f1","expires_in":7300 }

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
opro-0.3.2 app/views/opro/oauth/docs/markdown/refresh_tokens.md.erb
opro-0.3.1 app/views/opro/oauth/docs/markdown/refresh_tokens.md.erb
opro-0.3.0 app/views/opro/oauth/docs/markdown/refresh_tokens.md.erb
opro-0.3.0.pre3 app/views/opro/oauth/docs/markdown/refresh_tokens.md.erb
opro-0.3.0.pre2 app/views/opro/oauth/docs/markdown/refresh_tokens.md.erb
opro-0.3.0.pre1 app/views/opro/oauth/docs/markdown/refresh_tokens.md.erb
opro-0.3.0.pre app/views/opro/oauth/docs/markdown/refresh_tokens.md.erb
opro-0.2.1.pre app/views/opro/oauth/docs/markdown/refresh_tokens.md.erb
opro-0.2.0 app/views/opro/oauth/docs/markdown/refresh_tokens.md.erb
opro-0.1.0 app/views/opro/oauth/docs/markdown/refresh_tokens.md.erb
opro-0.0.3 app/views/oauth/docs/markdown/refresh_tokens.md.erb
opro-0.0.2 app/views/oauth/docs/markdown/refresh_tokens.md.erb