-
-
Notifications
You must be signed in to change notification settings - Fork 588
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
RSA and Jira support #394
base: master
Are you sure you want to change the base?
RSA and Jira support #394
Conversation
* master: Add into demo code example for safari handler factory OAuthSwift#386 Update README.md Fix memory leak due to strong reference of controller readme/atlassian # Conflicts: # README.md
// MARK: Jira | ||
func doOAuthJira(_ serviceParameters: [String:String]){ | ||
assert(Bundle.main.path(forResource: "private", ofType: "pem") != nil, "Jira authentication uses RSA-SHA1 which requires a stighlty different setup - see README.md for details.") | ||
let oauthswift = OAuth1Swift.initWithRSA( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could add something like that
let jiraURL = serviceParameters["url"] ?? "https://yourinstance.atlassian.net"
and then use it in the following code, allowing to use in config file a custom url
// | ||
|
||
import Foundation | ||
import SwiftyRSA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So OAuthSwift become dependant on SwiftyRSA
So OAuthSwift.podspec and Package.swift must be updated
But for carthage a Cartfile must be created, and see the comment on Podfile
platform :ios, '8.3' | ||
pod 'SwiftyRSA', '~> 1.2.0' | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By becoming dependant and make OAuthSwift target dependant on this I suspect that the project file has been updated to work only with cocoapod
So opening the projet without the workspace will failed
And then Carthage could not work.
I could do the fix later
Then for macOS? :p
@@ -16,24 +16,24 @@ public protocol OAuthSwiftCredentialHeadersFactory { | |||
open class OAuthSwiftCredential: NSObject, NSCoding { | |||
|
|||
public enum Version { | |||
case oauth1, oauth2 | |||
case oauth1, oauth1RSA, oauth2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After merging I will do some change, try to remove this case oauth1RSA
by cutting the link between version and signature or use oauth1(SignatureMethod)
I make some change in last version allowing to make dependencies injection. The class then to inject OAuthSwiftCredential.SignatureMethod.delegates[.RSA_SHA1: RSA.Type) So a new project |
This adds OAuth1 SHA1-RSA and Jira support