Skip to content

Add action after_authenticate_success #175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,12 @@ There are several ways Azure AD groups can be created/managed. Some of them requ
* **Azure AD PowerShell**. The [Azure AD PowerShell module](https://docs.microsoft.com/en-us/powershell/azure/active-directory/install-adv2?view=azureadps-2.0) allows admins and (optionally) users to create and manage groups. (e.g. [New-AzureADGroup](https://docs.microsoft.com/en-us/powershell/module/azuread/new-azureadgroup?view=azureadps-2.0), and [Add-AzureADGroupMember](https://docs.microsoft.com/en-us/powershell/module/azuread/add-azureadgroupmember?view=azureadps-2.0) cmdlets.)
* **On-premises**. Many large organizations use Azure AD Connect to sync their on-premises AD to Azure AD. This usually includes all on-premises AD groups and memberships. Once these groups are synced to Azrue AD, they can be used with this plugin.

## Action Reference

| Action | Arguments | Description
| --- | --- | ---
| aadsso_after_authenticate_success | $jwt, $user | Fires after sucessfull authentication. Usefull for storing aditional data from azure as usermeta

## Advanced

### Refreshing the OpenID Connect configuration cache
Expand Down
2 changes: 2 additions & 0 deletions aad-sso-wordpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,8 @@ function authenticate( $user, $username, $password ) {
if ( true === $this->settings->enable_aad_group_to_wp_role ) {
$user = $this->update_wp_user_roles( $user, $group_memberships );
}

do_action('aadsso_after_authenticate_success', $jwt, $user);
}
} elseif ( isset( $token->error ) ) {

Expand Down