Replies: 2 comments 4 replies
-
How can I get logged the actual |
Beta Was this translation helpful? Give feedback.
1 reply
-
Thanks a lot!
Does it work with Laravel 10?
Arne
fre. 12. apr. 2024 kl. 18:03 skrev Steve Bauman ***@***.***>:
… Hi @acharseth <https://github.com/acharseth>,
I just pushed out an update that will allow you to retrieve the
BindException from the bind failure that occurs during this process.
Run composer update, then once complete, register a listener on the
LdapRecord Failed auth event before calling Auth::validate():
use LdapRecord\Container;use LdapRecord\Auth\Events\Failed;
$dispatcher = Container::getDispatcher();
$dispatcher->listen(Failed::class, function (Failed $event) {
$exception = $event->getException(); // \LdapRecord\Auth\BindException
$error = $exception->getDetailedError(); // \LdapRecord\DetailedError
// Do something with the error values:
$error->getErrorCode(); // int
$error->getErrorMessage(); // string
$error->getDiagnosticMessage(): // ?string
});
Give that a shot!
—
Reply to this email directly, view it on GitHub
<#646 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEBE7I5J46X42ZFRQUWEFALY5AAUBAVCNFSM6AAAAABGEIIAYSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TAOJXHEZTM>
.
You are receiving this because you were mentioned.Message ID:
<DirectoryTree/LdapRecord-Laravel/repo-discussions/646/comments/9097936@
github.com>
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an application where I need to support re-authentication for one action. I am trying to implementing this by using the Jetstream Confirm Password functionality like this:
Blade file:
Livewire component:
This will open a window which performs a re-authentication on the user.
This re-authentication fails however.
I have been able to get one step further by adding the following callback function in AuthServiceProvider:
This re-authentication still fails however on the validation with the following error message:
[2024-04-11T16:14:02.574092+02:00] test-mock.INFO: {"from":"App\Providers\AuthServiceProvider","userId":"myUserId","ip":"10.10.10.10"} (Re)Auth validation: false
What am I doing wrong?
I notice that confirmPasswordUsing() is missing in LdapUserAuthentication and have tried to add it like this:
This did not help though and I am not sure it is necessary since my new call back function do get called without this.
Anything else I need to do?
Beta Was this translation helpful? Give feedback.
All reactions