Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

JWE Loading and Verification Example #637

Open
@phzio

Description

Version(s) affected

3.3.5

Description

Just installed via composer and tried the test here:
https://web-token.spomky-labs.com/the-components/examples#jwe-loading-and-verification

It fails with:
Uncaught ArgumentCountError: Too few arguments to function Jose\Component\Encryption\JWEDecrypter::__construct(), 1 passed

Note that the example uses a single AlgorithmManager to the JWEDecrypter constructor

How to reproduce

Install 3.3.5 of the library via composer. Use the example here:
https://web-token.spomky-labs.com/the-components/examples#jwe-loading-and-verification

Possible Solution

update to call JWEDecrypter constructor in example with a null second parameter:
Jose\Component\Encryption\JWEDecrypter(AlgorithmManager,AlgorithmManager|null)

Or allow the constructor to only take one argument:
public function __construct(
AlgorithmManager $algorithmManager,
null|AlgorithmManager $contentEncryptionAlgorithmManager = null,
private readonly null|CompressionMethodManager $compressionMethodManager = null
)

Additional Context

Also noting that IssuedAtChecker, NotBeforeChecker, ExpirationTimeChecker do not accept a Symfony NativeClock object as an argument to the constructor and expect an integer. This is because the first argument is the allowed time drift

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /