From 0d811b8996bf1fec51a06cb98fc063b84349d454 Mon Sep 17 00:00:00 2001 From: Adam Fowler Date: Tue, 19 Nov 2024 09:24:58 +0000 Subject: [PATCH] Changes for hb-auth 2.0 --- auth-jwt/Package.swift | 4 ++-- auth-jwt/Sources/App/Models/User.swift | 2 +- auth-otp/Package.swift | 6 +++--- auth-otp/Sources/App/Middleware/TOTPAuthenticator.swift | 2 +- .../Sources/App/Repositories/UserPostgresRepository.swift | 2 +- auth-srp/Package.swift | 2 +- sessions/Package.swift | 4 ++-- todos-auth-fluent/Package.swift | 6 +++--- todos-auth-fluent/Sources/App/Models/User.swift | 2 +- webauthn/Package.swift | 2 +- websocket-chat/Package.swift | 2 +- websocket-echo/Package.swift | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/auth-jwt/Package.swift b/auth-jwt/Package.swift index ec9ac655..57c1f36a 100644 --- a/auth-jwt/Package.swift +++ b/auth-jwt/Package.swift @@ -11,7 +11,7 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.0.0"), - .package(url: "https://github.com/hummingbird-project/hummingbird-auth.git", from: "2.0.0-rc.5"), + .package(url: "https://github.com/hummingbird-project/hummingbird-auth.git", from: "2.0.0"), .package(url: "https://github.com/hummingbird-project/hummingbird-fluent.git", from: "2.0.0-beta.2"), .package(url: "https://github.com/vapor/jwt-kit.git", from: "5.0.0-beta.4"), .package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.4.0"), @@ -26,7 +26,7 @@ let package = Package( .product(name: "FluentKit", package: "fluent-kit"), .product(name: "FluentSQLiteDriver", package: "fluent-sqlite-driver"), .product(name: "Hummingbird", package: "hummingbird"), - .product(name: "Bcrypt", package: "hummingbird-auth"), + .product(name: "HummingbirdBcrypt", package: "hummingbird-auth"), .product(name: "HummingbirdAuth", package: "hummingbird-auth"), .product(name: "HummingbirdBasicAuth", package: "hummingbird-auth"), .product(name: "HummingbirdFluent", package: "hummingbird-fluent"), diff --git a/auth-jwt/Sources/App/Models/User.swift b/auth-jwt/Sources/App/Models/User.swift index ea4bd6f8..93787a7e 100644 --- a/auth-jwt/Sources/App/Models/User.swift +++ b/auth-jwt/Sources/App/Models/User.swift @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -import Bcrypt +import HummingbirdBcrypt import FluentKit import Foundation import Hummingbird diff --git a/auth-otp/Package.swift b/auth-otp/Package.swift index a83b1ed7..da81276d 100644 --- a/auth-otp/Package.swift +++ b/auth-otp/Package.swift @@ -11,7 +11,7 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.3.0"), - .package(url: "https://github.com/hummingbird-project/hummingbird-auth.git", from: "2.0.0-rc.5"), + .package(url: "https://github.com/hummingbird-project/hummingbird-auth.git", from: "2.0.0"), .package(url: "https://github.com/hummingbird-project/hummingbird-postgres.git", from: "0.5.0"), .package(url: "https://github.com/hummingbird-project/swift-mustache.git", from: "2.0.0-rc"), .package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.3.0"), @@ -22,10 +22,10 @@ let package = Package( dependencies: [ .product(name: "ArgumentParser", package: "swift-argument-parser"), .product(name: "Hummingbird", package: "hummingbird"), - .product(name: "Bcrypt", package: "hummingbird-auth"), + .product(name: "HummingbirdBcrypt", package: "hummingbird-auth"), .product(name: "HummingbirdAuth", package: "hummingbird-auth"), .product(name: "HummingbirdBasicAuth", package: "hummingbird-auth"), - .product(name: "OTP", package: "hummingbird-auth"), + .product(name: "HummingbirdOTP", package: "hummingbird-auth"), .product(name: "Mustache", package: "swift-mustache"), .product(name: "HummingbirdPostgres", package: "hummingbird-postgres"), .product(name: "PostgresMigrations", package: "hummingbird-postgres"), diff --git a/auth-otp/Sources/App/Middleware/TOTPAuthenticator.swift b/auth-otp/Sources/App/Middleware/TOTPAuthenticator.swift index 46b339c1..17405114 100644 --- a/auth-otp/Sources/App/Middleware/TOTPAuthenticator.swift +++ b/auth-otp/Sources/App/Middleware/TOTPAuthenticator.swift @@ -2,7 +2,7 @@ import Foundation import HTTPTypes import Hummingbird import HummingbirdAuth -import OTP +import HummingbirdOTP struct TOTPAuthenticator: AuthenticatorMiddleware { typealias Context = AppSessionRequestContext diff --git a/auth-otp/Sources/App/Repositories/UserPostgresRepository.swift b/auth-otp/Sources/App/Repositories/UserPostgresRepository.swift index 12a9d9ab..e6b1b171 100644 --- a/auth-otp/Sources/App/Repositories/UserPostgresRepository.swift +++ b/auth-otp/Sources/App/Repositories/UserPostgresRepository.swift @@ -1,4 +1,4 @@ -import Bcrypt +import HummingbirdBcrypt import Foundation import Hummingbird import Logging diff --git a/auth-srp/Package.swift b/auth-srp/Package.swift index 9097a055..a01b1039 100644 --- a/auth-srp/Package.swift +++ b/auth-srp/Package.swift @@ -8,7 +8,7 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.0.0"), - .package(url: "https://github.com/hummingbird-project/hummingbird-auth.git", from: "2.0.0-rc.5"), + .package(url: "https://github.com/hummingbird-project/hummingbird-auth.git", from: "2.0.0"), .package(url: "https://github.com/hummingbird-project/hummingbird-fluent.git", from: "2.0.0-beta.2"), .package(url: "https://github.com/vapor/fluent-sqlite-driver.git", from: "4.7.0"), .package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.4.0"), diff --git a/sessions/Package.swift b/sessions/Package.swift index e4c38e27..f66e3e79 100644 --- a/sessions/Package.swift +++ b/sessions/Package.swift @@ -11,7 +11,7 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.0.0"), - .package(url: "https://github.com/hummingbird-project/hummingbird-auth.git", from: "2.0.0-rc.5"), + .package(url: "https://github.com/hummingbird-project/hummingbird-auth.git", from: "2.0.0"), .package(url: "https://github.com/hummingbird-project/hummingbird-fluent.git", from: "2.0.0-beta.2"), .package(url: "https://github.com/vapor/fluent-kit.git", from: "1.48.5"), .package(url: "https://github.com/vapor/fluent-sqlite-driver.git", from: "4.7.0"), @@ -24,7 +24,7 @@ let package = Package( .product(name: "FluentKit", package: "fluent-kit"), .product(name: "FluentSQLiteDriver", package: "fluent-sqlite-driver"), .product(name: "Hummingbird", package: "hummingbird"), - .product(name: "Bcrypt", package: "hummingbird-auth"), + .product(name: "HummingbirdBcrypt", package: "hummingbird-auth"), .product(name: "HummingbirdAuth", package: "hummingbird-auth"), .product(name: "HummingbirdBasicAuth", package: "hummingbird-auth"), .product(name: "HummingbirdFluent", package: "hummingbird-fluent"), diff --git a/todos-auth-fluent/Package.swift b/todos-auth-fluent/Package.swift index 2f646df8..3acc2828 100644 --- a/todos-auth-fluent/Package.swift +++ b/todos-auth-fluent/Package.swift @@ -8,8 +8,8 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.3.0"), - .package(url: "https://github.com/hummingbird-project/hummingbird-auth.git", from: "2.0.0-rc.5"), - .package(url: "https://github.com/hummingbird-project/hummingbird-compression.git", from: "2.0.0-rc"), + .package(url: "https://github.com/hummingbird-project/hummingbird-auth.git", from: "2.0.0"), + .package(url: "https://github.com/hummingbird-project/hummingbird-compression.git", from: "2.0.0"), .package(url: "https://github.com/hummingbird-project/hummingbird-fluent.git", from: "2.0.0-beta.2"), .package(url: "https://github.com/hummingbird-project/swift-mustache.git", from: "2.0.0-beta.1"), .package(url: "https://github.com/vapor/fluent-kit.git", from: "1.48.5"), @@ -24,7 +24,7 @@ let package = Package( .product(name: "FluentSQLiteDriver", package: "fluent-sqlite-driver"), .product(name: "FluentKit", package: "fluent-kit"), .product(name: "Hummingbird", package: "hummingbird"), - .product(name: "Bcrypt", package: "hummingbird-auth"), + .product(name: "HummingbirdBcrypt", package: "hummingbird-auth"), .product(name: "HummingbirdAuth", package: "hummingbird-auth"), .product(name: "HummingbirdBasicAuth", package: "hummingbird-auth"), .product(name: "HummingbirdCompression", package: "hummingbird-compression"), diff --git a/todos-auth-fluent/Sources/App/Models/User.swift b/todos-auth-fluent/Sources/App/Models/User.swift index 6ad88592..d12a9aa3 100644 --- a/todos-auth-fluent/Sources/App/Models/User.swift +++ b/todos-auth-fluent/Sources/App/Models/User.swift @@ -12,12 +12,12 @@ // //===----------------------------------------------------------------------===// -import Bcrypt import FluentKit import Foundation import Hummingbird import HummingbirdAuth import HummingbirdBasicAuth +import HummingbirdBcrypt import HummingbirdFluent import NIOPosix diff --git a/webauthn/Package.swift b/webauthn/Package.swift index 40405692..6b8bb750 100644 --- a/webauthn/Package.swift +++ b/webauthn/Package.swift @@ -11,7 +11,7 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.2.0"), - .package(url: "https://github.com/hummingbird-project/hummingbird-auth.git", from: "2.0.0-rc.5"), + .package(url: "https://github.com/hummingbird-project/hummingbird-auth.git", from: "2.0.0"), .package(url: "https://github.com/hummingbird-project/hummingbird-fluent.git", from: "2.0.0-beta.2"), .package(url: "https://github.com/hummingbird-project/swift-mustache.git", from: "2.0.0-beta.1"), .package(url: "https://github.com/vapor/fluent-sqlite-driver.git", from: "4.7.0"), diff --git a/websocket-chat/Package.swift b/websocket-chat/Package.swift index 40e50ffd..8cf5b88c 100644 --- a/websocket-chat/Package.swift +++ b/websocket-chat/Package.swift @@ -11,7 +11,7 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.0.0"), - .package(url: "https://github.com/hummingbird-project/hummingbird-websocket.git", from: "2.0.0"), + .package(url: "https://github.com/hummingbird-project/hummingbird-websocket.git", branch: "split-ws-client"), .package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.4.0"), ], targets: [ diff --git a/websocket-echo/Package.swift b/websocket-echo/Package.swift index 44a36408..9e1fc8e7 100644 --- a/websocket-echo/Package.swift +++ b/websocket-echo/Package.swift @@ -11,7 +11,7 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.0.0"), - .package(url: "https://github.com/hummingbird-project/hummingbird-websocket.git", from: "2.0.0"), + .package(url: "https://github.com/hummingbird-project/hummingbird-websocket.git", branch: "split-ws-client"), .package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.4.0"), ], targets: [