Strava v0.4.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 access token

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

Link to this function authorize_url(client, params) View Source

The authorization URL endpoint of the provider.

  • params additional query parameters for the URL
Link to this function 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 optional comma delimited string of "view_private" and/or "write", leave blank for read-only permissions.

  • state: string optional returned to your application, useful if the authentication is done from various points in an app

Parse the detailed representation of the current athlete from the OAuth2 access token.

Link to this function get_token(client, params, headers) View Source

Retrieve an access token given the specified validation code.

Link to this function 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