User Authenticated Event Backport
| Allow adding support for sending UserAuthenticatedEvent in extensions which support XWiki versions older than 13.3RC1 |
| Type | JAR |
| Category | Other |
| Developed by | |
| Rating | |
| License | GNU Lesser General Public License 2.1 |
| Compatibility | Support XWiki 8.4+, and not needed anymore in XWiki >= 16.10.19/17.10.12/18.4.4/18.7.0RC1. |
Description
Allow adding support for sending UserAuthenticatedEvent in extensions which support XWiki versions older than 13.3RC1.
In general the common process would be to add it as dependency to your authenticator project:
<dependency>
<groupId>org.xwiki.contrib</groupId>
<artifactId>userauthenticatedevent-backport</artifactId>
<version>1.0.0</version>
</dependency>And then use the org.xwiki.security.authentication.UserAuthenticatedEventNotifier component:
@Inject
private UserAuthenticatedEventNotifier notifier;
public checkAuth()
{
// Authenticate and remember the user in the session
principal = authenticate();
if (principal == null) {
// Notify about this new authentication
getNotifier().notify(principal.getName());
return new XWikiUser(principal.getName());
}
return null;
}Prerequisites & Installation Instructions
We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).
You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.
Versions
Dependencies
Dependencies for this extension (org.xwiki.contrib:userauthenticatedevent-backport 1.0.0):