Swiftpack.co - VineFiner/oauth-swift-core as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by VineFiner.
VineFiner/oauth-swift-core 0.0.1
swift oauth Library
⭐️ 0
🕓 2 years ago
iOS macOS
.package(url: "https://github.com/VineFiner/oauth-swift-core.git", from: "0.0.1")

oauth-swift-core

This is the packaging of Oauth2.0

public protocol APIRequest: AnyObject {
    var refreshableToken: OAuthRefreshable { get } // Refresh actuator
     
    var httpClient: HTTPClient { get }
    var responseDecoder: JSONDecoder { get }
    
    var currentToken: OAuthAccessToken? { get set } // Token
    var tokenCreatedTime: Date? { get set } // createdTime
    
    /// As part of an API request this returns a valid OAuth token to use with any of the GoogleAPIs.
    /// - Parameter closure: The closure to be executed with the valid access token.
    /// - Returns: CodableModel
    func withToken<AnyCodableModel>(_ closure: @escaping (OAuthAccessToken) -> EventLoopFuture<AnyCodableModel>) -> EventLoopFuture<AnyCodableModel>
}

GitHub

link
Stars: 0
Last commit: 2 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics