trivago / Heimdallr.swift

Easy to use OAuth 2 library for iOS, written in Swift.
Apache License 2.0
639 stars 86 forks source link

Make OAuthAccessTokenParser objc compatible #100

Closed bckr closed 7 years ago

bckr commented 7 years ago

Description:

With merging #79 we accidentally broke objc compatibility because of the newly introduced OAuthAccessTokenParser that exposes the Result type in our initializer.

Proposed solution:

I've changed the signature of OAuthAccessTokenParser to throw instead of returning Result

@objc public protocol OAuthAccessTokenParser {
    func parse(data: NSData) throws -> OAuthAccessToken
}

fyi: @poislagarde

Stengo commented 7 years ago

Looks good to me. I think this is the nicest solution to restore objc compatibility 👍

SusannProszak commented 7 years ago

👍 looks good