Module: Strava::OAuth::Config

Extended by:
Config
Included in:
Config
Defined in:
lib/strava/oauth/config.rb

Overview

Configuration module for the OAuth client.

This module manages OAuth-specific configuration settings including the OAuth endpoint URL and application credentials (client ID and secret) required for token exchange and refresh operations.

Examples:

Configure OAuth client

Strava::OAuth.configure do |config|
  config.client_id = ENV['STRAVA_CLIENT_ID']
  config.client_secret = ENV['STRAVA_CLIENT_SECRET']
end

See Also:

Constant Summary collapse

ATTRIBUTES =

Returns List of configurable OAuth attributes.

Returns:

  • (Array<Symbol>)

    List of configurable OAuth attributes

%i[
  endpoint
  client_id
  client_secret
].freeze

Instance Method Summary collapse

Instance Method Details

#resetvoid

This method returns an undefined value.

Reset configuration to default values.

Sets the endpoint to the default Strava OAuth URL and clears the client credentials.



40
41
42
43
44
# File 'lib/strava/oauth/config.rb', line 40

def reset
  self.endpoint = 'https://www.strava.com/oauth'
  self.client_id = nil
  self.client_secret = nil
end