[GH-ISSUE #155] Can you keep the entire HTTP response in the postOAuthRequestTokenWithCallbackURL? #94

Closed
opened 2026-03-03 16:45:37 +03:00 by kerem · 2 comments
Owner

Originally created by @SokichiFujita on GitHub (Dec 12, 2015).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/155

I would like to use the entire HTTP response of access token endpoint in the authorizeWithCallbackURL of OAuth1Swift. But postOAuthRequestTokenWithCallbackURL drops a lot of information from it.

In spite of Twitter returns user_id and screen_name with access_token and access_token_secret, postOAuthRequestTokenWithCallbackURL method only pass access_token and access_token_secret. Another information is dropped. I think user_id or screen_name are also important for apps.

I want to use following success handler:

public typealias TokenSuccessHandler = (credential: OAuthSwiftCredential, data: NSData, response: NSURLResponse) -> Void

Current success handler:

public typealias TokenSuccessHandler = (credential: OAuthSwiftCredential, response: NSURLResponse) -> Void

How do you think about this idea?

Originally created by @SokichiFujita on GitHub (Dec 12, 2015). Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/155 I would like to use the entire HTTP response of access token endpoint in the `authorizeWithCallbackURL` of `OAuth1Swift`. But `postOAuthRequestTokenWithCallbackURL` drops a lot of information from it. In spite of Twitter returns `user_id` and `screen_name` with `access_token` and `access_token_secret`, `postOAuthRequestTokenWithCallbackURL` method only pass `access_token` and `access_token_secret`. Another information is dropped. I think `user_id` or `screen_name` are also important for apps. I want to use following success handler: ``` public typealias TokenSuccessHandler = (credential: OAuthSwiftCredential, data: NSData, response: NSURLResponse) -> Void ``` Current success handler: ``` public typealias TokenSuccessHandler = (credential: OAuthSwiftCredential, response: NSURLResponse) -> Void ``` How do you think about this idea?
kerem closed this issue 2026-03-03 16:45:38 +03:00
Author
Owner

@phimage commented on GitHub (Dec 12, 2015):

Did you look master branch head code in OAuthSwift.swift?
Someone make a PR to add to TokenSuccessHandler 'parameters'
Maybe in this dictionnary there is the information you looking for

<!-- gh-comment-id:164140550 --> @phimage commented on GitHub (Dec 12, 2015): Did you look master branch head code in OAuthSwift.swift? Someone make a PR to add to TokenSuccessHandler 'parameters' Maybe in this dictionnary there is the information you looking for
Author
Owner

@SokichiFujita commented on GitHub (Dec 12, 2015):

Thank you! #152 fixed this issue, as you mentioned.
parameters has the information that I need.

<!-- gh-comment-id:164146283 --> @SokichiFujita commented on GitHub (Dec 12, 2015): Thank you! #152 fixed this issue, as you mentioned. `parameters` has the information that I need.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/OAuthSwift#94
No description provided.