Skip to content

Commit ec73cf3

Browse files
authored
fix typo (pcke -> pkce) (#59)
1 parent a5352fd commit ec73cf3

5 files changed

Lines changed: 11 additions & 11 deletions

File tree

Sources/OAuthenticator/Authenticator.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ extension Authenticator {
309309

310310
let authConfig = TokenHandling.AuthorizationURLParameters(
311311
credentials: config.appCredentials,
312-
pcke: config.tokenHandling.pkce,
312+
pkce: config.tokenHandling.pkce,
313313
parRequestURI: parRequestURI,
314314
stateToken: stateToken,
315315
responseProvider: { try await self.dpopResponse(for: $0, login: nil, isAuthServer: true) }
@@ -327,7 +327,7 @@ extension Authenticator {
327327
redirectURL: callbackURL,
328328
responseProvider: { try await self.dpopResponse(for: $0, login: nil, isAuthServer: true) },
329329
stateToken: stateToken,
330-
pcke: config.tokenHandling.pkce
330+
pkce: config.tokenHandling.pkce
331331
)
332332

333333
let login = try await config.tokenHandling.loginProvider(params)

Sources/OAuthenticator/Models.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public struct TokenHandling: Sendable {
134134

135135
public struct AuthorizationURLParameters: Sendable {
136136
public let credentials: AppCredentials
137-
public let pcke: PKCEVerifier?
137+
public let pkce: PKCEVerifier?
138138
public let parRequestURI: String?
139139
public let stateToken: String
140140
public let responseProvider: URLResponseProvider
@@ -146,22 +146,22 @@ public struct TokenHandling: Sendable {
146146
public let redirectURL: URL
147147
public let responseProvider: URLResponseProvider
148148
public let stateToken: String
149-
public let pcke: PKCEVerifier?
149+
public let pkce: PKCEVerifier?
150150

151151
public init(
152152
authorizationURL: URL,
153153
credentials: AppCredentials,
154154
redirectURL: URL,
155155
responseProvider: @escaping URLResponseProvider,
156156
stateToken: String,
157-
pcke: PKCEVerifier?
157+
pkce: PKCEVerifier?
158158
) {
159159
self.authorizationURL = authorizationURL
160160
self.credentials = credentials
161161
self.redirectURL = redirectURL
162162
self.responseProvider = responseProvider
163163
self.stateToken = stateToken
164-
self.pcke = pcke
164+
self.pkce = pkce
165165
}
166166
}
167167

Sources/OAuthenticator/Services/Bluesky.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public enum Bluesky {
148148
throw AuthenticatorError.issuingServerMismatch(iss, server.issuer)
149149
}
150150

151-
guard let verifier = params.pcke?.verifier else {
151+
guard let verifier = params.pkce?.verifier else {
152152
throw AuthenticatorError.pkceRequired
153153
}
154154

Tests/OAuthenticatorTests/BlueskyTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct BlueskyTests {
5353
redirectURL: URL(string: "app.test://callback?code=123&state=state&iss=this_is_incorrect")!,
5454
responseProvider: provider,
5555
stateToken: "state",
56-
pcke: verifier
56+
pkce: verifier
5757
)
5858

5959
await #expect(throws: AuthenticatorError.issuingServerMismatch("this_is_incorrect", "https://server-metadata.test")) {
@@ -113,7 +113,7 @@ struct BlueskyTests {
113113
redirectURL: URL(string: "app.test:/callback?code=123&state=state&iss=https://server-metadata.test")!,
114114
responseProvider: provider,
115115
stateToken: "state",
116-
pcke: verifier
116+
pkce: verifier
117117
)
118118

119119
await #expect(throws: AuthenticatorError.tokenInvalid) {

Tests/OAuthenticatorTests/GoogleTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct GoogleTests {
4242
// Validate URL is properly constructed
4343
let params = TokenHandling.AuthorizationURLParameters(
4444
credentials: creds,
45-
pcke: nil,
45+
pkce: nil,
4646
parRequestURI: nil,
4747
stateToken: "unused",
4848
responseProvider: provider
@@ -79,7 +79,7 @@ struct GoogleTests {
7979
// Validate URL is properly constructed
8080
let params = TokenHandling.AuthorizationURLParameters(
8181
credentials: creds,
82-
pcke: nil,
82+
pkce: nil,
8383
parRequestURI: nil,
8484
stateToken: "unused",
8585
responseProvider: provider

0 commit comments

Comments
 (0)