Module: Strava::Api::Endpoints::OAuth
- Included in:
- Client
- Defined in:
- lib/strava/api/endpoints/oauth.rb
Overview
API endpoints for OAuth operations.
OAuth endpoints provide functionality for managing OAuth access tokens, including the ability to revoke an athlete's access token and deauthorize an application's access to their data.
Instance Method Summary collapse
-
#deauthorize(options = {}) ⇒ Authorization
deprecated
Deprecated.
Use #revoke instead. The
oauth/deauthorizeendpoint will be retired on June 1, 2027 in favor of the newoauth/revokeendpoint. -
#revoke(options = {}) ⇒ Authorization
Revoke access to an athlete's data.
Instance Method Details
#deauthorize(options = {}) ⇒ Authorization
Use #revoke instead. The oauth/deauthorize endpoint will
be retired on June 1, 2027 in favor of the new oauth/revoke endpoint.
Revoke access to an athlete's data.
Deauthorizes the application and revokes the athlete's access token. After calling this method, the access token will no longer be valid and the athlete will need to reauthorize the application.
55 56 57 |
# File 'lib/strava/api/endpoints/oauth.rb', line 55 def ( = {}) Strava::Models::Authorization.new(post('deauthorize', { endpoint: Strava::OAuth.config.endpoint }.merge())) end |
#revoke(options = {}) ⇒ Authorization
Revoke access to an athlete's data.
Revokes the athlete's access token. After calling this method, the access token will no longer be valid and the athlete will need to reauthorize the application.
32 33 34 |
# File 'lib/strava/api/endpoints/oauth.rb', line 32 def revoke( = {}) Strava::Models::Authorization.new(post('revoke', { endpoint: Strava::OAuth.config.endpoint }.merge())) end |