Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Upgrade firebase/php-jwt #223

Open
wants to merge 3 commits into
base: 3.x
Choose a base branch
from
Open

Upgrade firebase/php-jwt #223

wants to merge 3 commits into from

Conversation

tuupola
Copy link
Owner

@tuupola tuupola commented May 20, 2022

No description provided.

Comment on lines +127 to +130
$this->key[$key] = new Key($secret, "HS256");
}
} else {
$this->key = new Key($this->options["secret"], "HS256");
Copy link

@curzio-della-santa curzio-della-santa Nov 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of hard-coding "HS256" you should use the algorithm in $options

        if (is_array($this->options["secret"])) {
            foreach ($this->options["secret"] as $key => $secret) {
                $this->key[$key] = new Key($secret, $this->options["algorithm"][0] ?? "HS256");
            }
        } else {
            $this->key = new Key($this->options["secret"], $this->options["algorithm"][0] ?? "HS256");
        }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants