Skip to content

Commit 5705eca

Browse files
committed
removed unused code
1 parent 7fc22ae commit 5705eca

File tree

2 files changed

+12
-92
lines changed

2 files changed

+12
-92
lines changed

Auth0.xcodeproj/project.pbxproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,11 @@
604604
C1B3BA4E2C24BA37004A32A4 /* Responses.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FBBF03A1CC96AA70024D2AF /* Responses.swift */; };
605605
C1B3BA4F2C24BA37004A32A4 /* Generators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C4F552C23C9123000C89615 /* Generators.swift */; };
606606
C1B3BA502C24BA37004A32A4 /* Auth0Spec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F93BC0A1CC6B0DE0031519F /* Auth0Spec.swift */; };
607+
D40997452F4ED9B00042F3B6 /* IDTokenProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = D40997442F4ED9B00042F3B6 /* IDTokenProtocol.swift */; };
608+
D40997462F4ED9B00042F3B6 /* IDTokenProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = D40997442F4ED9B00042F3B6 /* IDTokenProtocol.swift */; };
609+
D40997472F4ED9B00042F3B6 /* IDTokenProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = D40997442F4ED9B00042F3B6 /* IDTokenProtocol.swift */; };
610+
D40997482F4ED9B00042F3B6 /* IDTokenProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = D40997442F4ED9B00042F3B6 /* IDTokenProtocol.swift */; };
611+
D40997492F4ED9B00042F3B6 /* IDTokenProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = D40997442F4ED9B00042F3B6 /* IDTokenProtocol.swift */; };
607612
D41DED172DCA083800F5B1A4 /* Nimble.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CD9FC6B26FE30A6009C2B27 /* Nimble.xcframework */; };
608613
D41DED182DCA083B00F5B1A4 /* Quick.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CD9FC6C26FE30A6009C2B27 /* Quick.xcframework */; };
609614
D41DED192DCA084100F5B1A4 /* Quick.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CD9FC6C26FE30A6009C2B27 /* Quick.xcframework */; };
@@ -1089,6 +1094,7 @@
10891094
C1B3B9A82C24B297004A32A4 /* OAuth2Vision.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OAuth2Vision.app; sourceTree = BUILT_PRODUCTS_DIR; };
10901095
C1B3B9C02C24B39E004A32A4 /* Auth0.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Auth0.framework; sourceTree = BUILT_PRODUCTS_DIR; };
10911096
C1B3B9C72C24B39E004A32A4 /* Auth0Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Auth0Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
1097+
D40997442F4ED9B00042F3B6 /* IDTokenProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IDTokenProtocol.swift; sourceTree = "<group>"; };
10921098
D424ED5C2F15FEFD00052186 /* Auth0MFAClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Auth0MFAClient.swift; sourceTree = "<group>"; };
10931099
D424ED5D2F15FEFD00052186 /* MFAClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MFAClient.swift; sourceTree = "<group>"; };
10941100
D424ED692F15FF4E00052186 /* Authenticator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Authenticator.swift; sourceTree = "<group>"; };
@@ -1688,6 +1694,7 @@
16881694
children = (
16891695
D4ABFE6C2F10BEA3000C828C /* MFARequiredErrorPayload.swift */,
16901696
5FDE87491D8A424700EA27DC /* Auth0Authentication.swift */,
1697+
D40997442F4ED9B00042F3B6 /* IDTokenProtocol.swift */,
16911698
5FDE874A1D8A424700EA27DC /* Authentication.swift */,
16921699
5FDE874B1D8A424700EA27DC /* AuthenticationError.swift */,
16931700
5FDE874F1D8A424700EA27DC /* AuthenticationHandlers.swift */,
@@ -2500,6 +2507,7 @@
25002507
isa = PBXSourcesBuildPhase;
25012508
buildActionMask = 2147483647;
25022509
files = (
2510+
D40997472F4ED9B00042F3B6 /* IDTokenProtocol.swift in Sources */,
25032511
5CB41D4423D0BA2C00074024 /* IDTokenSignatureValidator.swift in Sources */,
25042512
5CB41D4C23D0BA2C00074024 /* Optional+DebugDescription.swift in Sources */,
25052513
5C505FB62E21669F005D0757 /* SenderConstraining.swift in Sources */,
@@ -2674,6 +2682,7 @@
26742682
5C41F6CE244F970500252548 /* IDTokenValidator.swift in Sources */,
26752683
5C41F6CA244F96AE00252548 /* LoginTransaction.swift in Sources */,
26762684
D499DAF92E6EB1FD000E7E2F /* PasskeyEnrollmentChallenge.swift in Sources */,
2685+
D40997492F4ED9B00042F3B6 /* IDTokenProtocol.swift in Sources */,
26772686
D499DAFA2E6EB1FD000E7E2F /* PhoneEnrollmentChallenge.swift in Sources */,
26782687
D499DAFB2E6EB1FD000E7E2F /* PushEnrollmentChallenge.swift in Sources */,
26792688
D499DAFC2E6EB1FD000E7E2F /* Auth0MyAccountAuthenticationMethods.swift in Sources */,
@@ -2922,6 +2931,7 @@
29222931
5CFB82502D5BF324009FD237 /* APICredentials.swift in Sources */,
29232932
D46390932F18F29100FD84D7 /* RequestValidator.swift in Sources */,
29242933
5C505FDA2E2168BD005D0757 /* KeychainKeyStore.swift in Sources */,
2934+
D40997452F4ED9B00042F3B6 /* IDTokenProtocol.swift in Sources */,
29252935
62BD27022EEA928F001FC67C /* SynchronizationBarrier.swift in Sources */,
29262936
5C505FC72E216784005D0757 /* ECPublicKey.swift in Sources */,
29272937
5F23E6DC1D4ACD6100C3F2D9 /* NSData+URLSafe.swift in Sources */,
@@ -3005,6 +3015,7 @@
30053015
5CFB82532D5BF324009FD237 /* APICredentials.swift in Sources */,
30063016
D46390952F18F29100FD84D7 /* RequestValidator.swift in Sources */,
30073017
5C505FD92E2168BD005D0757 /* KeychainKeyStore.swift in Sources */,
3018+
D40997482F4ED9B00042F3B6 /* IDTokenProtocol.swift in Sources */,
30083019
62BD27002EEA928F001FC67C /* SynchronizationBarrier.swift in Sources */,
30093020
5C505FC82E216784005D0757 /* ECPublicKey.swift in Sources */,
30103021
5F23E7061D4B88EA00C3F2D9 /* NSData+URLSafe.swift in Sources */,
@@ -3105,6 +3116,7 @@
31053116
D424ED7C2F15FF8B00052186 /* MFAEnrollmentChallenge.swift in Sources */,
31063117
D46390A02F19C32400FD84D7 /* MFAHandlers.swift in Sources */,
31073118
C1B3B9F52C24B6D4004A32A4 /* Credentials.swift in Sources */,
3119+
D40997462F4ED9B00042F3B6 /* IDTokenProtocol.swift in Sources */,
31083120
C1B3B9F62C24B6D4004A32A4 /* AuthenticationHandlers.swift in Sources */,
31093121
5C3D87F52DB9B3DF00AACC34 /* SignupPasskey.swift in Sources */,
31103122
C1B3B9F72C24B6D4004A32A4 /* Telemetry.swift in Sources */,

Auth0/Request.swift

Lines changed: 0 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -210,98 +210,6 @@ public extension Request {
210210

211211
}
212212

213-
// MARK: - ID Token Validation
214-
215-
#if WEB_AUTH_PLATFORM
216-
public extension Request where T == Credentials, E == AuthenticationError {
217-
218-
/**
219-
Starts the request and automatically validates the ID token if present in the response.
220-
221-
- Parameters:
222-
- issuer: The expected issuer of the ID token.
223-
- leeway: The amount of leeway, in milliseconds, to accommodate potential clock skew. Defaults to 60000ms (60 seconds).
224-
- maxAge: The maximum authentication age, in seconds. Optional.
225-
- nonce: The expected nonce value. Optional.
226-
- organization: The expected organization ID or name. Optional.
227-
- authentication: The Authentication instance used for JWKS retrieval.
228-
- callback: Callback that receives the validated credentials or an error.
229-
*/
230-
func startWithIDTokenValidation(issuer: String,
231-
leeway: Int = 60000,
232-
maxAge: Int? = nil,
233-
nonce: String? = nil,
234-
organization: String? = nil,
235-
authentication: Authentication,
236-
callback: @escaping Callback) {
237-
self.start { result in
238-
switch result {
239-
case .failure(let error):
240-
callback(.failure(error))
241-
case .success(let credentials):
242-
guard !credentials.idToken.isEmpty else {
243-
return callback(.success(credentials))
244-
}
245-
246-
let validatorContext = IDTokenValidatorContext(authentication: authentication,
247-
issuer: issuer,
248-
leeway: leeway,
249-
maxAge: maxAge,
250-
nonce: nonce,
251-
organization: organization)
252-
validate(idToken: credentials.idToken, with: validatorContext) { error in
253-
if let error = error {
254-
return callback(.failure(AuthenticationError(cause: error)))
255-
}
256-
callback(.success(credentials))
257-
}
258-
}
259-
}
260-
}
261-
}
262-
263-
public extension Request where T == SSOCredentials, E == AuthenticationError {
264-
265-
/**
266-
Starts the request and automatically validates the ID token if present in the response.
267-
268-
- Parameters:
269-
- issuer: The expected issuer of the ID token.
270-
- leeway: The amount of leeway, in milliseconds, to accommodate potential clock skew. Defaults to 60000ms (60 seconds).
271-
- authentication: The Authentication instance used for JWKS retrieval.
272-
- callback: Callback that receives the validated credentials or an error.
273-
*/
274-
func startWithIDTokenValidation(issuer: String,
275-
leeway: Int = 60000,
276-
authentication: Authentication,
277-
callback: @escaping Callback) {
278-
self.start { result in
279-
switch result {
280-
case .failure(let error):
281-
callback(.failure(error))
282-
case .success(let credentials):
283-
guard !credentials.idToken.isEmpty else {
284-
return callback(.success(credentials))
285-
}
286-
287-
let validatorContext = IDTokenValidatorContext(authentication: authentication,
288-
issuer: issuer,
289-
leeway: leeway,
290-
maxAge: nil,
291-
nonce: nil,
292-
organization: nil)
293-
validate(idToken: credentials.idToken, with: validatorContext) { error in
294-
if let error = error {
295-
return callback(.failure(AuthenticationError(cause: error)))
296-
}
297-
callback(.success(credentials))
298-
}
299-
}
300-
}
301-
}
302-
}
303-
#endif
304-
305213
// MARK: - Async/Await
306214

307215
#if canImport(_Concurrency)

0 commit comments

Comments
 (0)