Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change how Faraday does auth #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

culley-stripe
Copy link
Collaborator

No description provided.

@culley-stripe culley-stripe force-pushed the upgrade_faraday branch 2 times, most recently from 1aa5753 to 23bb1d4 Compare May 9, 2024 20:35
change Faraday authorization methodology

more liberal versioning of Faraday

no longer need to sanitize token in url

remove trailing slash from DEFAULT_URL
@@ -8,7 +8,6 @@ def initialize(response)

def get_response_info(response)
url = response.env.url
url.query = url.query.sub(/token=[^&]*/, 'token=**SECRET**')
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We no longer have the token, aka query, set as we put token in the headers now.

@@ -13,7 +13,7 @@ class Client
extend Forwardable

# The default base URL for the Ecwid API
DEFAULT_URL = "https://app.ecwid.com/"
DEFAULT_URL = "https://app.ecwid.com"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The trailing slash in the DEFAULT_URL is causing a double slash to be in the url, which faraday does not like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant