Adldap2/Adldap2-Laravel

Help with custom authentication logic.

Closed this issue · 5 comments

  • Laravel Version: 6.1
  • Adldap2-Laravel Version: 10.2.3
  • PHP Version:7.2
  • LDAP Type: ActiveDirectory

Hi Steve, can you help me implement some logic in the ldap flow. Basically, I need to do the following (recall we are using 2 different AD servers)

  1. If a user has a non-null memberof attribute from AD and they are in a specific group, I mark the Eloquent user as an admin.
  2. If they are not, AND they authenticated with the second AD host, I need to mark them differently.
  3. Otherwise I need to cause them to fail authentication.
    At this time I'm doing 1 and 2 in our AdldapEventSubscriber, but this is after they have successfully authenticated, I don't know how to fail their authentication if 1 and 2 both fail, somewhere upstream probably.

Description:

Steps To Reproduce:

Hi @justageek!

I don’t have access to a computer until tomorrow (on vacation at the moment), but I wanted to give you a response as soon as possible so you were aware. I’ll message here as soon as I’m back to help you out.

Thanks!

Thanks, have a good vacation.

Hi @justageek, I'm back and ready to help you get up and running.

Can you re-post your custom authentication logic to see how you're currently handling the 2 server scenario? I forget how this is being done in your application, so it'd help refresh my memory 😅

Once I have that I can help you with the implementation 👍

Hey Steve, and thanks, I think I figured out a way to make this work by adding some more logic to the user provider.

Oh, excellent! Glad to hear you resolved it! 😄 I'm back from vacation now so if you require assistance, feel free to give me another shout. 👍