Closed frital closed 2 years ago
Hi @robsontenorio ! Any special reason to not accept this PR? It is out of scope or something missing? Pls let me know! Thx in advance!
Alo @robsontenorio ! Tudo bem? Alguma razao específica pra nao querer aceitar o PR? Ou só correria mesmo? :) Muito obrigado por antecipacao, e no seu aguardo!! Abracos!!
@frital hi there. Could you please include tests?
I am not sure about the flow. With tests we could review it.
I'd like to have this merged as well.
Can I create the tests for you so you can merge the request?
Hi @OfficialBAMM !
This would be nice!! Thx in advance!
@OfficialBAMM for sure! We need tests to keep consistence through all features :)
Created the PR. Let me know what you think!
@OfficialBAMM I think you forgot to open PR
@robsontenorio I opened an PR to this PR.
See: https://github.com/frital/laravel-keycloak-guard/pull/1
Atleast I think that how this should be done, but I might be wrong.
Thx @OfficialBAMM !! I just merged you PR!!
I hope that now @robsontenorio will be able to accept the PR. =) Thx guys!!
@frital,
I was already about to implement an egalitarian solution.
Congratulations for the initiative. I need this feature.
Could you guys test master branch with this feature DISABLED if everything is ok, before I release a tag ?
Just tested it on my application with an empty string or removed at all. Both worked for me.
Given a random string gives a Call to undefined method App\\Providers\\KeycloakEloquentUserProvider::randomFunction()
.
This should probably give a better error. If you're interested I could make a PR for it.
Looking at the code, I see no reason why it shouldn't work for existing installations.
This PR aims to, as an option, allow the API to create / update the authenticated user in the local users table. To achieve this, its possible to inform a custom method on a custom UserProvider, that will be called instead
retrieveByCredentials
and will receive the complete decoded token as parameter, not just the credentials.