Skip to content

Commit

Permalink
Merge pull request #872 from lcobucci/remove-deprecated-items
Browse files Browse the repository at this point in the history
Remove deprecated components
  • Loading branch information
lcobucci authored Aug 19, 2022
2 parents 163bad6 + f9c4480 commit 4db6a78
Show file tree
Hide file tree
Showing 32 changed files with 87 additions and 1,340 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/composer-json-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ jobs:
- name: "Check composer.json explicit dependencies"
run: "composer-require-checker check"

- name: "Check composer.json unused dependencies"
run: "composer-unused"
# - name: "Check composer.json unused dependencies"
# run: "composer-unused"
26 changes: 0 additions & 26 deletions docs/supported-algorithms.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,6 @@ They're usually recommended for scenarios where these operations are handled by
!!! Warning
Although `BLAKE2B` is fantastic due to its performance, it's not [JWT standard] and won't necessarily be offered by other libraries.

### Deprecated items

In `v4.2.0`, we introduced key length validation and added a way for users to still use non-recommended keys.
The following implementations will be **removed** in `v5.0.0` (use them carefully):

| Name | Description | Class | Key length req. |
|---------|--------------------|------------------------------------------|-----------------|
| `HS256` | HMAC using SHA-256 | `\Lcobucci\JWT\Signer\Hmac\UnsafeSha256` | `>= 1 bit` |
| `HS384` | HMAC using SHA-384 | `\Lcobucci\JWT\Signer\Hmac\UnsafeSha384` | `>= 1 bit` |
| `HS512` | HMAC using SHA-512 | `\Lcobucci\JWT\Signer\Hmac\UnsafeSha512` | `>= 1 bit` |


## Asymmetric algorithms

Asymmetric algorithms perform signature creation with private/secret keys and verification with public keys.
Expand All @@ -48,18 +36,4 @@ They're usually recommended for scenarios where creation is handled by a compone
| `RS512` | RSASSA-PKCS1-v1_5 using SHA-512 | `\Lcobucci\JWT\Signer\Rsa\Sha512` | `>= 2048 bits` |
| `EdDSA` | EdDSA signature algorithms | `\Lcobucci\JWT\Signer\Eddsa` | `>= 256 bits` |

### Deprecated items

In `v4.2.0`, we introduced key length validation and added a way for users to still use non-recommended keys.
The following implementations will be **removed** in `v5.0.0` (use them carefully):

| Name | Description | Class | Key length req. |
|---------|---------------------------------|-------------------------------------------|-----------------|
| `ES256` | ECDSA using P-256 and SHA-256 | `\Lcobucci\JWT\Signer\Ecdsa\UnsafeSha256` | `>= 1 bit` |
| `ES384` | ECDSA using P-384 and SHA-384 | `\Lcobucci\JWT\Signer\Ecdsa\UnsafeSha384` | `>= 1 bit` |
| `ES512` | ECDSA using P-521 and SHA-512 | `\Lcobucci\JWT\Signer\Ecdsa\UnsafeSha512` | `>= 1 bit` |
| `RS256` | RSASSA-PKCS1-v1_5 using SHA-256 | `\Lcobucci\JWT\Signer\Rsa\UnsafeSha256` | `>= 1 bit` |
| `RS384` | RSASSA-PKCS1-v1_5 using SHA-384 | `\Lcobucci\JWT\Signer\Rsa\UnsafeSha384` | `>= 1 bit` |
| `RS512` | RSASSA-PKCS1-v1_5 using SHA-512 | `\Lcobucci\JWT\Signer\Rsa\UnsafeSha512` | `>= 1 bit` |

[JWT standard]: https://www.iana.org/assignments/jose/jose.xhtml#web-signature-encryption-algorithms
7 changes: 0 additions & 7 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,3 @@ parameters:
paths:
- src
- test

ignoreErrors:
- '#Call to method .* of deprecated class Lcobucci\\JWT\\Signer\\Key\\LocalFileReference#'
- """
#^.+ deprecated class Lcobucci\\\\JWT\\\\Signer\\\\.+:
Deprecated since v4\\.2$#
"""
27 changes: 0 additions & 27 deletions src/Signer/Ecdsa/UnsafeSha256.php

This file was deleted.

27 changes: 0 additions & 27 deletions src/Signer/Ecdsa/UnsafeSha384.php

This file was deleted.

27 changes: 0 additions & 27 deletions src/Signer/Ecdsa/UnsafeSha512.php

This file was deleted.

25 changes: 0 additions & 25 deletions src/Signer/Hmac/UnsafeSha256.php

This file was deleted.

25 changes: 0 additions & 25 deletions src/Signer/Hmac/UnsafeSha384.php

This file was deleted.

25 changes: 0 additions & 25 deletions src/Signer/Hmac/UnsafeSha512.php

This file was deleted.

50 changes: 0 additions & 50 deletions src/Signer/Key/LocalFileReference.php

This file was deleted.

22 changes: 0 additions & 22 deletions src/Signer/Rsa/UnsafeSha256.php

This file was deleted.

22 changes: 0 additions & 22 deletions src/Signer/Rsa/UnsafeSha384.php

This file was deleted.

22 changes: 0 additions & 22 deletions src/Signer/Rsa/UnsafeSha512.php

This file was deleted.

57 changes: 0 additions & 57 deletions src/Signer/UnsafeEcdsa.php

This file was deleted.

Loading

0 comments on commit 4db6a78

Please sign in to comment.