diff --git a/README.md b/README.md index 7f9efdb..a848029 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Key features include: - [Custom URLSession](https://codefiesta.github.io/OAuthKit/documentation/oauthkit/configuration#URL-Session) configuration for complete control custom protocol specific data - [Observable State](https://codefiesta.github.io/OAuthKit/documentation/oauthkit/gettingstarted#Observing-OAuth-State) driven events to allow full control over when and if users are prompted to authenticate with an OAuth provider - Supports all Apple Platforms (iOS, macOS, tvOS, visionOS, watchOS) -- [Support for every OAuth 2.0 Flow](#oauthkit-configuration) +- [Support for every OAuth 2.0 Flow](#oauthkit-authorization-flows) - [Authorization Code](#oauth-20-authorization-code-flow) - [PKCE](#oauth-20-pkce-flow) - [Device Code](#oauth-20-device-code-flow) diff --git a/Sources/OAuthKit/Extensions/EnvironmentValues+Extensions.swift b/Sources/OAuthKit/Extensions/EnvironmentValues+Extensions.swift index 9b18a7e..f50488e 100644 --- a/Sources/OAuthKit/Extensions/EnvironmentValues+Extensions.swift +++ b/Sources/OAuthKit/Extensions/EnvironmentValues+Extensions.swift @@ -2,7 +2,7 @@ // EnvironmentValues+Extensions.swift // // -// Created by Kevin McKee on 5/16/24. +// Created by Kevin McKee // import SwiftUI diff --git a/Sources/OAuthKit/Extensions/Task+Extensions.swift b/Sources/OAuthKit/Extensions/Task+Extensions.swift index bbc4e45..c8f5efa 100644 --- a/Sources/OAuthKit/Extensions/Task+Extensions.swift +++ b/Sources/OAuthKit/Extensions/Task+Extensions.swift @@ -2,7 +2,7 @@ // Task+Extensions.swift // // -// Created by Kevin McKee on 5/30/24. +// Created by Kevin McKee // import Foundation diff --git a/Sources/OAuthKit/Extensions/URLRequest+Extensions.swift b/Sources/OAuthKit/Extensions/URLRequest+Extensions.swift index c08d39a..b3bbfa4 100644 --- a/Sources/OAuthKit/Extensions/URLRequest+Extensions.swift +++ b/Sources/OAuthKit/Extensions/URLRequest+Extensions.swift @@ -2,7 +2,7 @@ // URLRequest+Extensions.swift // // -// Created by Kevin McKee on 5/30/24. +// Created by Kevin McKee // import Foundation diff --git a/Sources/OAuthKit/Keychain/Keychain.swift b/Sources/OAuthKit/Keychain/Keychain.swift index f78ce4f..99717d2 100644 --- a/Sources/OAuthKit/Keychain/Keychain.swift +++ b/Sources/OAuthKit/Keychain/Keychain.swift @@ -2,7 +2,7 @@ // Keychain.swift // // -// Created by Kevin McKee on 5/28/24. +// Created by Kevin McKee // import Foundation @@ -159,6 +159,6 @@ class Keychain: @unchecked Sendable { /// - Parameter key: the key to prefix. /// - Returns: the unique account key to use private func accountKey(_ key: String) -> String { - return applicationTag + "." + key + "." + tokenIdentifier + applicationTag + "." + key + "." + tokenIdentifier } } diff --git a/Sources/OAuthKit/Network/NetworkMonitor.swift b/Sources/OAuthKit/Network/NetworkMonitor.swift index 2a978d9..6ec1113 100644 --- a/Sources/OAuthKit/Network/NetworkMonitor.swift +++ b/Sources/OAuthKit/Network/NetworkMonitor.swift @@ -2,7 +2,7 @@ // NetworkMonitor.swift // // -// Created by Kevin McKee on 5/30/24. +// Created by Kevin McKee // import Network diff --git a/Sources/OAuthKit/OAuth+PKCE.swift b/Sources/OAuthKit/OAuth+PKCE.swift index 4dafd8d..9efba01 100644 --- a/Sources/OAuthKit/OAuth+PKCE.swift +++ b/Sources/OAuthKit/OAuth+PKCE.swift @@ -27,14 +27,13 @@ extension OAuth { public let state: String /// Returns the code challenge method. Currently only supports [SHA-256 hash](https://en.wikipedia.org/wiki/SHA-2). - public var codeChallengeMethod: String { - defaultCodeChallengeMethod - } + public let codeChallengeMethod: String /// Initializer. public init() { codeVerifier = .secureRandom() codeChallenge = codeVerifier.sha256.base64URL + codeChallengeMethod = defaultCodeChallengeMethod state = .secureRandom(count: 16).base64URL } } diff --git a/Sources/OAuthKit/OAuth+Request.swift b/Sources/OAuthKit/OAuth+Request.swift index 051388b..f850c39 100644 --- a/Sources/OAuthKit/OAuth+Request.swift +++ b/Sources/OAuthKit/OAuth+Request.swift @@ -18,7 +18,7 @@ extension OAuth { struct Request { /// Provides constants for URLQueryItem keys. - enum Key: String { + fileprivate enum Key: String { case code = "code" case clientID = "client_id" case clientSecret = "client_secret" diff --git a/Sources/OAuthKit/OAuth.swift b/Sources/OAuthKit/OAuth.swift index 4e01479..14fcfa8 100644 --- a/Sources/OAuthKit/OAuth.swift +++ b/Sources/OAuthKit/OAuth.swift @@ -2,7 +2,7 @@ // OAuth.swift // // -// Created by Kevin McKee on 5/14/24. +// Created by Kevin McKee // import Foundation #if canImport(LocalAuthentication) diff --git a/Sources/OAuthKit/Views/OAWebView.swift b/Sources/OAuthKit/Views/OAWebView.swift index 1a4cdfd..d58c614 100644 --- a/Sources/OAuthKit/Views/OAWebView.swift +++ b/Sources/OAuthKit/Views/OAWebView.swift @@ -2,7 +2,7 @@ // OAWebView.swift // // -// Created by Kevin McKee on 5/16/24. +// Created by Kevin McKee // #if canImport(WebKit) diff --git a/Sources/OAuthKit/Views/OAWebViewCoordinator.swift b/Sources/OAuthKit/Views/OAWebViewCoordinator.swift index ad7c08e..71d3538 100644 --- a/Sources/OAuthKit/Views/OAWebViewCoordinator.swift +++ b/Sources/OAuthKit/Views/OAWebViewCoordinator.swift @@ -2,7 +2,7 @@ // OAWebViewCoordinator.swift // // -// Created by Kevin McKee on 5/16/24. +// Created by Kevin McKee // #if canImport(WebKit) diff --git a/Tests/OAuthKitTests/OAuth+Monitor.swift b/Tests/OAuthKitTests/OAuth+Monitor.swift index 02893e3..552031d 100644 --- a/Tests/OAuthKitTests/OAuth+Monitor.swift +++ b/Tests/OAuthKitTests/OAuth+Monitor.swift @@ -2,7 +2,7 @@ // OAuth+Monitor.swift // OAuthKit // -// Created by Kevin McKee on 6/6/25. +// Created by Kevin McKee // import Foundation