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

"Authorization" header not found in Xsolla webhook request. #98

Open
wagishsharma opened this issue Jul 19, 2022 · 0 comments · May be fixed by #99
Open

"Authorization" header not found in Xsolla webhook request. #98

wagishsharma opened this issue Jul 19, 2022 · 0 comments · May be fixed by #99

Comments

@wagishsharma
Copy link

Happens due to class WebhookAutheticator in function authenticateSignature:

//This checks for case sensitive key: "authorization"

 if (!array_key_exists('authorization', $headers)) {
            throw new InvalidSignatureException('"Authorization" header not found in Xsolla webhook request. Please check troubleshooting section in README.md https://github.com/xsolla/xsolla-sdk-php#troubleshooting');
        }

In my case I was getting the key "Authorization" (with capital 'A') in the header and it was throwing InvalidSignatureException.

Quick Solution for individual is to dump your headers and check for this key and make changes according.
A more permanent solution will be to read case insensitive header key to avoid this issue.

@wagishsharma wagishsharma linked a pull request Jul 19, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant