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

Bugfixes & 1 Enhancement #6

Merged
merged 2 commits into from
Apr 4, 2021
Merged

Conversation

klAvAx
Copy link
Contributor

@klAvAx klAvAx commented Feb 8, 2021

Using PHP 7.4.12 And CodeIgniter 4.1.1
2 Functionality breaking errors:
FIX For "Declaration of Heimdall\Http\Headers::normalizeKey($key) must be compatible with Heimdall\Interfaces\Http\HeadersInterface::normalizeKey($key)" Error
FIX For "Return value of Heimdall\Server\HeimdallAuthorizationServer::return() must be an instance of CodeIgniter\HTTP\Response, none returned" Error

Did follow execution order as best i could but it seems current resource server implementation only validates token, it should return or pass some data to main controller, currently (CI 4.1.1) viable through request header data or global data.
By phpleague's docs 'resource server' should return some header attributes but it looks like codeigniter does not support that and is using PSR4, maybe this workaround is not good but i believe it is one of essential functions of this library.
ENHANCEMENT "If the access token is valid then attributes as per phpleague's oauth2 docs will be accessible via $this->request->header('authorization')->getValue()"

…t be compatible with Heimdall\Interfaces\Http\HeadersInterface::normalizeKey($key)" Error

FIX For "Return value of Heimdall\\Server\\HeimdallAuthorizationServer::return() must be an instance of CodeIgniter\\HTTP\\Response, none returned" Error
ENHANCEMENT "If the access token is valid then attributes as per phpleague's oauth2 docs will be accessible via $this->request->header('authorization')->getValue()"
@klAvAx klAvAx marked this pull request as draft February 9, 2021 21:42
@klAvAx klAvAx marked this pull request as ready for review February 9, 2021 21:42
@ergec
Copy link

ergec commented Mar 20, 2021

Thanks a lot. These fixes solved the problems with my PHP 7.4.16 installation.

ezralazuardy
ezralazuardy previously approved these changes Apr 4, 2021
@codeclimate
Copy link

codeclimate bot commented Apr 4, 2021

Code Climate has analyzed commit e8a01dd and detected 0 issues on this pull request.

View more on Code Climate.

@ezralazuardy ezralazuardy merged commit 1097f25 into ezralazuardy:master Apr 4, 2021
@ezralazuardy
Copy link
Owner

sorry for the late response.., anyway, thanks for your contribution 😀

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 this pull request may close these issues.

3 participants