Support the ongoing development of Laravel.io →
Authentication
Last updated 1 year ago.
0

You'd probably have to write a custom auth driver: http://laravel.com/docs/extending#authentication

I think this might be fairly simple, actually. Your driver's validateCredentials() function would base64 encode the username and password and check that:

function validateCredentials(UserInterface $oldDbUser, array $credentials)
{
    $pass = base64_encode($credentials['password']);
    $username = base64_encode($credentials['username']);
    return ($oldDbUser->getAuthPassword() == $pass) && ($username = $oldDbUser->username);
}
Last updated 1 year ago.
0

thepsion5 said:

You'd probably have to write a custom auth driver: http://laravel.com/docs/extending#authentication

I think this might be fairly simple, actually. Your driver's validateCredentials() function would base64 encode the username and password and check that:

function validateCredentials(UserInterface $oldDbUser, array $credentials)
{
   $pass = base64_encode($credentials['password']);
   $username = base64_encode($credentials['username']);
   return ($oldDbUser->getAuthPassword() == $pass) && ($username = $oldDbUser->username);
}

Mmm. yes, i think this would be enought, but cant understand in which file i should put this extend...

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.