What's New

JWSETKit 0.19.0

2024-05-02T10:28:44Z
  • feat: Support compression in non Apple platforms
  • feat: Add strict parameter to verify signature when algorithm header is not protected
  • feat: JWK thumbprint URI
  • feat: Arabic, Spanish and French error message translations
  • fix: PBES2 encryption/decryption failed
  • fix: JWE's AAD authentication
  • fix: Decoding issue when JWE protected header is empty
  • fix: Find appropriate JWE key for ECDH-ES
  • fix: JWS encode when protected header is empty
  • fix: JWS multiple signature
  • fix: JWK parsing using AnyJSONWebKey throws error
  • fix: JWS decode failure when protected header or payload is empty
  • fix: JWS detached payload encode/decode issue
  • test: RFS7520 signature test scenarios
  • test: RFC 7920 Encryption tests for ECDH-ES
  • chore: Reimplemented synchronization
  • chore: Direct (dynamicMember) getter/setter for ReadWriteLockedValue
  • chore: Direct (dynamicMember) getter/setter for TypedProtectedWebContainer/JSONProtectedWebContainer
  • chore: Create SECURITY.md

JWSETKit

A library for working with JSON Web Signature (JWS) and JSON Web Token (JWT).

Swift CodeQL License Release version

Lines of Code Duplicated Lines

Quality Gate Status Technical Debt Maintainability Rating Coverage

Overview

JSON Web Signature (JWS) represents content secured with digital signatures or Message Authentication Codes (MACs) using JSON-based RFC7159 data structures. The JWS cryptographic mechanisms provide integrity protection for an arbitrary sequence of octets.

JSON Web Token (JWT) is a compact claims representation format intended for space constrained environments such as HTTP Authorization headers and URI query parameters.

This module makes it possible to serialize, deserialize, create, and verify JWS/JWT messages.

Supported Swift Versions

This library was introduced with support for Swift 5.8 or later.

Getting Started

To use JWSETKit, add the following dependency to your Package.swift:

dependencies: [
    .package(url: "https://github.com/amosavian/JWSETKit", .upToNextMinor(from: "0.8.0"))
]

Note that this repository does not have a 1.0 tag yet, so the API is not stable.

You can then add the specific product dependency to your target:

dependencies: [
    .product(name: "JWSETKit", package: "JWSETKit"),
]

Usage

For detailed usage and API documentation, check the documentation.

Comparison To Other Libraries

Features

JWSETKit jwt-kit JOSESwift Auth0's JWTDecode
JSON Web Signature (JWS)
JWS Multiple Signatures
JWS Unencoded/Detached Payload
JSON Web Token (JWT)
JWT Signature Verfication
JWT Expire/NotBefore Validity
JSON Web Encryption (JWE)
Support CommonCrypto Keys
Support CryptoKit Keys

Supported Algorithms

Signature/HMAC

JWSETKit jwt-kit JOSESwift Auth0's JWTDecode
HS256
HS384
HS512
RS256
RS384
RS512
ES256
ES384
ES512
PS256
PS384
PS512
PS512
EdDSA

Key Encryption

JWSETKit JOSESwift
RSA1_5
RSA-OAEP
RSA-OAEP-256
A128KW
A192KW
A256KW
dir
ECDH-ES
ECDH-ES+A128KW
ECDH-ES+A192KW
ECDH-ES+A256KW
A128GCMKW
A192GCMKW
A256GCMKW
PBES2-HS256+A128KW
PBES2-HS384+A192KW
PBES2-HS512+A256KW

Content Encryption

JWSETKit JOSESwift
A128CBC-HS256
A192CBC-HS384
A256CBC-HS512
A128GCM
A192GCM
A256GCM

Description

  • Swift Tools 5.8.0
View More Packages from this Author

Dependencies

Last updated: Sat Jun 15 2024 08:20:59 GMT-0900 (Hawaii-Aleutian Daylight Time)