Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V5 #107

Merged
merged 32 commits into from
Feb 21, 2024
Merged

V5 #107

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
f71bbbd
Move away from BoringSSL (#99)
ptoffy Oct 28, 2023
8c0d308
Implement `JWTKeyCollection` and hide `JWTSigner` (#111)
ptoffy Nov 5, 2023
e6d4031
Add RSA pre-generated token test (#114)
ptoffy Nov 6, 2023
019be16
Enable full CI on the 5.x branch
gwynne Nov 6, 2023
88603f4
Skip API breakage check for 5.x branch for now
gwynne Nov 6, 2023
60e4036
Add `Sendable` support (#116)
ptoffy Nov 6, 2023
0714ec2
Rename ES521 to ES512
ptoffy Nov 6, 2023
6ece739
Rename signer to algorithm
ptoffy Nov 9, 2023
e055580
Add support for custom time validation X5Cs (#119)
ptoffy Nov 11, 2023
0379804
Add ECDSAKey PEM export (#120)
ptoffy Nov 11, 2023
a6f3d32
Remove exports (#121)
ptoffy Nov 11, 2023
68a2775
Adopt `package` access and add RSA key PEM export (#122)
ptoffy Nov 12, 2023
307c7bc
Refactor RSAKey Equatable implementation
ptoffy Nov 12, 2023
31daf99
Remove public enums (#123)
ptoffy Nov 16, 2023
a67f2f2
Remove use of `Data(contentsOf:)`
ptoffy Nov 16, 2023
b8e16ba
Add RSA-PSS signature algorithm support (#112)
MFranceschi6 Nov 19, 2023
985be97
Adjust JWTError access modifiers
ptoffy Nov 20, 2023
1dca72d
Adjust JWTError access modifiers once again
ptoffy Nov 20, 2023
6594257
Add option to sign tokens with x5c chains (#126)
ptoffy Nov 24, 2023
7ceeaa7
Add option to fetch RSA primitives (#127)
ptoffy Nov 25, 2023
af2e42f
Split internal key structure into public and private (#128)
ptoffy Nov 27, 2023
28c84fd
Add customisable fields to JWTHeader (#129)
ptoffy Nov 29, 2023
952b3c0
Add `float` jwt header field type
ptoffy Nov 29, 2023
c05b3f4
Allow for custom JWT de/serialisation (#130)
ptoffy Feb 13, 2024
34553a9
Update swift-certificates and add customisable policy to X5C verifica…
ptoffy Feb 13, 2024
bc08f8b
Add key initialiser for SwiftCrypto key types
ptoffy Feb 13, 2024
5e72680
Add `missingX5CHeader` error
ptoffy Feb 13, 2024
f8c22f7
Add RSA size boundary (#135)
ptoffy Feb 16, 2024
13bca58
Update README and DocC (#136)
ptoffy Feb 21, 2024
45e171e
Add some tests to get coverage up (#139)
ptoffy Feb 21, 2024
e800097
Merge branch 'main' into 'jwtkit-5'
ptoffy Feb 21, 2024
87561f1
Merge branch 'main' into jwtkit-5
ptoffy Feb 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 8 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
* @0xTim @gwynne
* @ptoffy
/.github/CONTRIBUTING.md @ptoffy @0xTim @gwynne
/.github/workflows/*.yml @ptoffy @0xTim @gwynne
/.github/workflows/test.yml @ptoffy @gwynne
/.spi.yml @ptoffy @0xTim @gwynne
/.gitignore @ptoffy @0xTim @gwynne
/LICENSE @ptoffy @0xTim @gwynne
/README.md @ptoffy @0xTim @gwynne
18 changes: 0 additions & 18 deletions .github/contributing.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/api-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
with:
package_name: jwt-kit
modules: JWTKit
pathsToInvalidate: /jwt-kit/*
pathsToInvalidate: /jwtkit/*
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ concurrency:
cancel-in-progress: true
on:
pull_request: { types: [opened, reopened, synchronize, ready_for_review] }
push: { branches: [ main ] }
push: { branches: [ main, jwtkit-5 ] }

jobs:
linux-integration:
Expand All @@ -21,10 +21,13 @@ jobs:
with:
repository: vapor/jwt
path: jwt
ref: v5
- name: Use local JWTKit
run: swift package --package-path jwt edit jwt-kit --path ./jwt-kit
- name: Run tests with Thread Sanitizer
run: swift test --package-path jwt --sanitize=thread

unit-tests:
uses: vapor/ci/.github/workflows/run-unit-tests.yml@main
with:
with_public_api_check: ${{ github.event_name == 'pull_request' && !contains(github.base_ref, 'jwtkit-5') }}
17 changes: 15 additions & 2 deletions NOTICES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,23 @@
//
//===----------------------------------------------------------------------===//

This product contains a derivation of the Vendor BoringSSL and Build ASM scripts
from Swift Crypto.
This product contains a derivation of the Wycheproof tests from the Swift Crypto package.

* LICENSE (Apache License 2.0):
* https://www.apache.org/licenses/LICENSE-2.0
* HOMEPAGE:
* https://github.com/apple/swift-crypto

This product contains the SubjectPublicKeyInfo.swift file from the Swift ASN1 package.

* LICENSE (Apache License 2.0):
* https://www.apache.org/licenses/LICENSE-2.0
* HOMEPAGE:
* https://github.com/apple/swift-asn1

This product contains the NIOCompression and NIOCompression namespaces from the SwiftNIO Extras package.

* LICENSE (Apache License 2.0):
* https://www.apache.org/licenses/LICENSE-2.0
* HOMEPAGE:
* https://github.com/apple/swift-nio-extras
63 changes: 35 additions & 28 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,41 +1,48 @@
// swift-tools-version:5.6
// swift-tools-version:5.9
import PackageDescription

// This package contains a vendored copy of BoringSSL. For ease of tracking
// down problems with the copy of BoringSSL in use, we include a copy of the
// commit hash of the revision of BoringSSL included in the given release.
// This is also reproduced in a file called hash.txt in the
// Sources/CCryptoBoringSSL directory. The source repository is at
// https://boringssl.googlesource.com/boringssl.
//
// BoringSSL Commit: 58a318edc892a595a5b043359a5d441869158699

let package = Package(
name: "jwt-kit",
platforms: [
.macOS(.v10_15),
.iOS(.v13),
.tvOS(.v13),
.watchOS(.v6),
.macOS(.v13),
.iOS(.v16),
.tvOS(.v16),
.watchOS(.v9),
],
products: [
.library(name: "JWTKit", targets: ["JWTKit"]),
/* This target is used only for symbol mangling. It's added and removed automatically because it emits build warnings. MANGLE_START
.library(name: "CJWTKitBoringSSL", type: .static, targets: ["CJWTKitBoringSSL"]),
MANGLE_END */
],
dependencies: [
.package(url: "https://github.com/apple/swift-crypto.git", "2.0.0" ..< "4.0.0"),
.package(url: "https://github.com/apple/swift-crypto.git", from: "3.0.0"),
.package(url: "https://github.com/apple/swift-certificates.git", from: "1.2.0"),
.package(url: "https://github.com/attaswift/BigInt.git", from: "5.3.0"),
],
targets: [
.target(name: "CJWTKitBoringSSL"),
.target(name: "JWTKit", dependencies: [
.target(name: "CJWTKitBoringSSL"),
.product(name: "Crypto", package: "swift-crypto"),
]),
.testTarget(name: "JWTKitTests", dependencies: [
.target(name: "JWTKit"),
]),
],
cxxLanguageStandard: .cxx11
.target(
name: "JWTKit",
dependencies: [
.product(name: "Crypto", package: "swift-crypto"),
.product(name: "_CryptoExtras", package: "swift-crypto"),
.product(name: "X509", package: "swift-certificates"),
.product(name: "BigInt", package: "BigInt"),
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency"),
]
),
.testTarget(
name: "JWTKitTests",
dependencies: [
"JWTKit",
],
resources: [
.copy("TestVectors"),
.copy("TestCertificates"),
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency"),
.enableUpcomingFeature("ConciseMagicFile"),
]
),
]
)
Loading
Loading