mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 20:55:57 +03:00
[GH-ISSUE #711] Trying to use different JSON properties in token result #460
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#460
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 @holgerflick on GitHub (Jan 11, 2024).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/711
Description:
I am unable to create a token POST request as the server seems to use different JSON properties than the framework. I have searched the code and I also looked into the documentation. I cannot find anything to solve this.
Instead of
grant_type, they useGrantType. Is there a way to map the property names to custom names that I have missed? Error message below.OAuth Provider? (Twitter, Github, ..):
Custom third party database which has not been released yet.
OAuth Version:
OS (Please fill the version) :
Installation method:
Library version:
Xcode version:
15.2
11.4 (Swift 5.2)
11.x (Swift 5.1)
10.x (Swift 5.0)
other: (Please fill in the version you are using.)
objective c
@phimage commented on GitHub (Jan 11, 2024):
no way to override key
easy way to do it could be create your own fork
most better way could be set in OAuthSwift2 a grantTypeKey = "grant_key",
use it when needed in code
and the var could be edited oauthSwift.grantTypeKey="GrantType"
and even better way maybe a call back function if exist to map all used key
Le jeu. 11 janv. 2024 à 06:22, Dr. Holger Flick @.***>
a écrit :