Strava v1.0.0 Strava.Auth View Source
An OAuth2 strategy for Strava.
Link to this section Summary
Functions
The authorization URL endpoint of the provider
Returns the authorize url based on the client configuration
Parse the detailed representation of the current athlete from the OAuth2 client or access token
Fetches an OAuth2.AccessToken struct by making a request to the token endpoint
Retrieve an access token given the specified validation code
Fetches an OAuth2.AccessToken struct by making a request to the token endpoint
Link to this section Functions
authorize_url(client, params) View Source
The authorization URL endpoint of the provider.
paramsadditional query parameters for the URL
authorize_url!(params \\ []) View Source
Returns the authorize url based on the client configuration.
approval_prompt: string optional "force" or "auto", use "force" to always show the authorization prompt even if the user has already authorized the current application, default is "auto"
scope: string required
Requested scopes, as a comma delimited string, e.g. "activity:read_all,activity:write". Applications should request only the scopes required for the application to function normally.
read- read public segments, public routes, public profile data, public posts, public events, club feeds, and leaderboardsread_all- read private routes, private segments, and private events for the userprofile:read_all- read all profile information even if the user has set their profile visibility to Followers or Only Youprofile:write- update the user's weight and Functional Threshold Power (FTP), and access to star or unstar segments on their behalfactivity:read- read the user's activity data for activities that are visible to Everyone and Followers, excluding privacy zone dataactivity:read_all- the same access as activity:read, plus privacy zone data and access to read the user's activities with visibility set to Only Youactivity:write- access to create manual activities and uploads, and access to edit any activities that are visible to the app, based on activity read access level
state: string optional returned to your application, useful if the authentication is done from various points in an app
get_athlete!(client_or_access_token) View Source
Parse the detailed representation of the current athlete from the OAuth2 client or access token.
get_token(params \\ [], headers \\ []) View Source
Fetches an OAuth2.AccessToken struct by making a request to the token endpoint.
Returns the OAuth2.Client struct loaded with the access token which can then
be used to make authenticated requests to an OAuth2 provider's API.
You can pass options to the underlying http library via options parameter
get_token(client, params, headers) View Source
Retrieve an access token given the specified validation code.
get_token!(params \\ [], headers \\ []) View Source
Fetches an OAuth2.AccessToken struct by making a request to the token endpoint.
Returns the OAuth2.Client struct loaded with the access token which can then
be used to make authenticated requests to an OAuth2 provider's API.
You can pass options to the underlying http library via options parameter