mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-27 13:15:55 +03:00
[PR #390] [CLOSED] Refactor o auth swift credential #622
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#622
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?
📋 Pull Request Information
Original PR: https://github.com/OAuthSwift/OAuthSwift/pull/390
Author: @Noambaron
Created: 7/6/2017
Status: ❌ Closed
Base:
master← Head:refactor-OAuthSwiftCredential📝 Commits (2)
3f8607bOAuthSwiftCredential refactor and redesign9542416Merge branch 'master' into rsa-support📊 Changes
17 files changed (+496 additions, -161 deletions)
View changed files
📝
Demo/Common/Images.xcassets/AppIcon.appiconset/Contents.json(+5 -0)📝
OAuthSwift.xcodeproj/project.pbxproj(+142 -10)➕
Sources/Credential/Concrete Credential Classes/HMAC_SHA1SignatureMethod.swift(+22 -0)➕
Sources/Credential/Concrete Credential Classes/OAuth1SwiftCredential.swift(+36 -0)➕
Sources/Credential/Concrete Credential Classes/OAuth1Version.swift(+18 -0)➕
Sources/Credential/Concrete Credential Classes/OAuth2SwiftCredential.swift(+27 -0)➕
Sources/Credential/Concrete Credential Classes/OAuth2Version.swift(+18 -0)📝
Sources/Credential/Credential Base Classes/BaseOAuthSwiftCredential.swift(+54 -134)➕
Sources/Credential/Credential Base Classes/BaseOAuthSwiftSignatureMethod.swift(+34 -0)➕
Sources/Credential/Credential Base Classes/BaseOAuthSwiftVersion.swift(+38 -0)➕
Sources/Credential/Credential Protocols/OAuthSwiftCredential.swift(+53 -0)➕
Sources/Credential/Credential Protocols/OAuthSwiftSignatureMethod.swift(+17 -0)➕
Sources/Credential/Credential Protocols/OAuthSwiftVersion.swift(+17 -0)📝
Sources/OAuth1Swift.swift(+2 -3)📝
Sources/OAuth2Swift.swift(+1 -2)📝
Sources/OAuthSwift.swift(+3 -3)📝
Sources/OAuthSwiftClient.swift(+9 -9)📄 Description
This refactors OAuthSwiftCredentials to be more flexible and extendable. No underlying implementation changed.
It uses a protocol based approach with base classes that implement common functionality, and concrete subclasses for specific credentials. This approach allows easy adjustment and enhancement and lays the ground for RSA support (That will follow in next PR).
OAuthSwiftCredentials is broken down into 3 protocols (OAuthSwiftCredential, OAuthSwiftSignatureMethod and OAuthSwiftVersion), There are also 3 base classes respectfully implementing common aspects of the protocols, and concrete classes for OAuth1, OAuth2 and HMAC-SHA1 that implement the specific parts.
Next PR will add RSA-SHA1 signatureMethod to extend functionality.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.