|
| 1 | +<!-- omit in toc --> |
1 | 2 | # SwAuth |
2 | 3 |
|
3 | | -SwAuth is an OAuth 2.0 HTTP request library for written in Swift iOS 15.0+, macOS 12.0+, watchOS 8.0+, and tvOS 15.0+. |
| 4 | +SwAuth is an OAuth 2.0 HTTP request library written in Swift iOS 15.0+, macOS 12.0+, watchOS 8.0+, and tvOS 15.0+. |
| 5 | + |
| 6 | +- [Features](#features) |
| 7 | +- [Requirements](#requirements) |
| 8 | +- [Installation/Integration](#installationintegration) |
| 9 | +- [Basic Usage](#basic-usage) |
| 10 | +- [Contributing](#contributing) |
4 | 11 |
|
5 | 12 | ## Features |
6 | 13 |
|
7 | | -- [x] Usable and beautiful syntax with async/await! Say goodbye to completion handler hell! |
| 14 | +- [x] Usable and beautiful syntax with async/await! Kiss completion handler hell and the closure jungle goodbye! |
8 | 15 | - [x] Supports Authorization Code Grant (RFC 6749/6750), Proof Key for Code Exchange (PKCE) extension for Authorization Code Grant (RFC 7636), and the Device Authorization Grant (RFC 8628). |
9 | | -- [x] Support for all Apple platforms. |
| 16 | +- [x] Support for all Apple device platforms. |
10 | 17 | - [x] Retry errored requests. |
11 | 18 | - [x] Automatically refreshes tokens. |
12 | | -- [x] Tokens stored on Keychain, cross-site request forgery mitigation with state by default. |
13 | | -- [x] Easily deal with JSON responses with built-in [SwiftyJSON](https://github.com/SwiftyJSON/SwiftyJSON). |
| 19 | +- [x] Tokens stored on Keychain and cross-site request forgery mitigation by default. |
| 20 | +- [x] Easily deal with JSON responses with [SwiftyJSON](https://github.com/SwiftyJSON/SwiftyJSON) built-in. |
14 | 21 | - [x] Easily integrate with SwiftUI. |
15 | | -- [x] [Complete, Meticulous, Thorough, documentation.](https://swauth.netlify.app/documentation/Swauth) |
16 | | -- [x] Errors that are actually useful... well most of the time. |
| 22 | +- [x] [Complete, meticulous, thorough, documentation.](https://swauth.netlify.app/documentation/Swauth) |
| 23 | +- [x] Errors that are probably, maybe actually useful. |
17 | 24 | - [x] Built on [SwiftNIO](https://github.com/apple/swift-nio) with [AsyncHTTPClient](https://github.com/swift-server/async-http-client). |
18 | 25 | - [x] QR Code for the Device Authorization Flow (tvOS/watchOS). |
19 | 26 | - [x] Sample/Example Apps. |
20 | 27 |
|
21 | | -## Requirments |
| 28 | +## Requirements |
22 | 29 |
|
23 | 30 | - Xcode 13+ |
24 | 31 | - iOS 15.0+ | macOS 12.0+ | watchOS 8.0+ | tvOS 15.0+ |
@@ -56,7 +63,7 @@ let keychain = Keychain(service: "com.your.bundleID", |
56 | 63 | let keychain = Keychain(service: "com.your.bundleID", |
57 | 64 | accessGroup: "appIdentifierPrefix.com.your.bundleID").label("Your App Name") |
58 | 65 |
|
59 | | -let spotify = AuthorizationCodeFlow(clientID: "YourClientID", |
| 66 | +let spotify = PKCEAuthorizationFlow(clientID: "YourClientID", |
60 | 67 | authorizationEndpoint: URL(string: "https://accounts.spotify.com/authorize")!, |
61 | 68 | tokenEndpoint: URL(string: "https://accounts.spotify.com/api/token")!, |
62 | 69 | redirectURI: "someapp://callback", |
@@ -118,7 +125,7 @@ Make your changes and submit and a PR for review! |
118 | 125 |
|
119 | 126 | Nice to have list: |
120 | 127 |
|
121 | | -- [ ] Include ready to go implementations of Web API's with endpoints like in the [exmaple app](https://github.com/Colaski/SwAuth/blob/main/SwAuthTestApp/SwAuthTestApp/Spotify.swift) |
| 128 | +- [ ] Include ready to go implementations of Web API's with endpoints like in the [example app](https://github.com/Colaski/SwAuth/blob/main/SwAuthTestApp/SwAuthTestApp/Spotify.swift) |
122 | 129 | - Perhaps Spotify, Google, Azure/Microsoft, Github etc. |
123 | 130 |
|
124 | | -- [ ] OAuth1 support |
| 131 | +- [ ] OAuth 1.0 support |
0 commit comments