Skip to content

Conversation

@mikaelengstrom
Copy link

The hook fires after successful authentication via Azure.

Motivation
It might be useful for various cases, a developer might want to store additional Azure-data in user-meta on login. Or track info like "last login via AD" to be able to identified potentially 'dead' accounts. One might also want to set up more complex group/role-mapping rules then the plugin is capable of today

If we have this in place we could let advanced users put code like this in their application-code:

add_action('aadsso_after_authenticate_success', function($jwt, $user){
    update_user_meta($user->ID, 'azure_id', $jwt->aud);
    update_user_meta($user->ID, 'last_login_via_ad', now());
}, 2, 10);

The hook fires after successful authentifications via Azure.
It might be useful for various cases, but my primary motivation
is to store additional Azure-data in user-meta on login
@mikaelengstrom
Copy link
Author

@psignoret Do you have any thoughts on this?

@psignoret psignoret force-pushed the master branch 2 times, most recently from 0320183 to 37c8428 Compare July 18, 2018 18:50
@mikaelengstrom
Copy link
Author

@psignoret – Could you please review this?

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.

1 participant