Skip to content

Commit f0c425a

Browse files
authored
Merge pull request #3397 from SwiftPackageIndex/add-soto-cognito
Roll back to Soto 6.x until the Soto Cognito libraries support 7.x
2 parents 5a89f16 + 449fba1 commit f0c425a

File tree

3 files changed

+41
-29
lines changed

3 files changed

+41
-29
lines changed

Package.resolved

Lines changed: 35 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ let package = Package(
4242
.package(url: "https://github.com/pointfreeco/swift-parsing.git", from: "0.12.0"),
4343
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing.git", from: "1.11.1"),
4444
.package(url: "https://github.com/scinfu/SwiftSoup.git", from: "2.3.2"),
45-
.package(url: "https://github.com/soto-project/soto.git", from: "7.0.0"),
45+
.package(url: "https://github.com/soto-project/soto.git", from: "6.0.0"),
46+
.package(url: "https://github.com/vapor-community/soto-cognito-authentication.git", from: "4.0.0"),
4647
.package(url: "https://github.com/vapor/fluent-postgres-driver.git", from: "2.0.0"),
4748
.package(url: "https://github.com/vapor/fluent.git", from: "4.0.0"),
4849
.package(url: "https://github.com/vapor/jwt-kit.git", from: "4.13.0"),
@@ -72,6 +73,7 @@ let package = Package(
7273
.product(name: "SwiftPMPackageCollections", package: "swift-package-manager"),
7374
.product(name: "Vapor", package: "vapor"),
7475
.product(name: "VaporToOpenAPI", package: "VaporToOpenAPI"),
76+
.product(name: "SotoCognitoAuthentication", package: "soto-cognito-authentication")
7577
],
7678
swiftSettings: swiftSettings,
7779
linkerSettings: [.unsafeFlags(["-Xlinker", "-interposable"],

Sources/S3Store/S3Store.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,13 @@ public struct S3Store {
3131
}
3232

3333
public func save(payload: Data, to key: Key) async throws {
34-
let client = AWSClient(credentialProvider: .static(accessKeyId: credentials.keyId, secretAccessKey: credentials.secret))
34+
let client = AWSClient(credentialProvider: .static(accessKeyId: credentials.keyId, secretAccessKey: credentials.secret),
35+
httpClientProvider: .createNew)
3536
do {
3637
let s3 = S3(client: client, region: Self.region)
3738
let req = S3.PutObjectRequest(
3839
acl: .publicRead, // requires "Block all public access" to be "off"
39-
body: .init(buffer: .init(data: payload)),
40+
body: .data(payload),
4041
bucket: key.bucket,
4142
key: key.path
4243
)

0 commit comments

Comments
 (0)