mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 20:55:57 +03:00
[GH-ISSUE #332] Receiving a 401 invalid_signature with each request #207
Labels
No labels
bug
cocoapod
duplicate
enhancement
feature-request
help wanted
help wanted
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/OAuthSwift#207
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bennokress on GitHub (Jan 17, 2017).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/332
Description
I'm trying to make API Calls protected with OAuth 1.0. The authorization with OAuthSwift is already working and giving me a token and a token secret. Sadly I get a 401 invalid_signature back when making calls afterwards. Looking at the requests and checking an online signature generator I see that the generated signatures indeed differ. I just don't know why, because I have no experience with the matter so far. What do you need from me to help me out?
OAuth Provider
OAuth Version:
OS (Please fill the version) :
Installation method:
Library version:
Xcode version:
8.0 (Swift 3.0)
8.0 (Swift 2.3)
7.3.1
other: (Please fill in the version you are using.)
objective c
@phimage commented on GitHub (Jan 17, 2017):
Could you provide a failed request sample
@bennokress commented on GitHub (Jan 18, 2017):
Of course :) I'm using OAuthSwiftAlamofire for the request, but I tested it with the standard
oauth.client.getand have the same result ...This is where I make the request:
And this is the
getOAuthSessionManager()where I get the stored Token and Token Secret from Keychain or generate a new one:Additionally
oauthswiftis defined like this (withconsumerKeyandconsumerSecretset, of course):The console shows the following output:
@phimage commented on GitHub (Jan 18, 2017):
try to not add oauth_consumer_key=xxx in your request
maybe your provider need it, but that's not standard
OAuthSwift manage all oauth* parameters, and maybe oauth_consumer_key is excluded from signature
@bennokress commented on GitHub (Jan 18, 2017):
Indeed, this fixed the problem. Thanks for taking the time to help me!
@J-Arji commented on GitHub (Aug 20, 2017):
con you help me for recive json from magento ?
@phimage commented on GitHub (Aug 20, 2017):
@J-Arji no