Language: Deutsch · English
Custom authentication at login – e.g. against LDAP, SSO or a REST service.
REFERENZ DEVELOPER UPDATED: JUL 2026 APPLIES TO NUCLOS 4.2026.X
On this page
An AuthenticationRule fires when a user logs in. It implements the AuthenticationRule interface and enables custom authentication – e.g. against an external system (LDAP, SSO, REST service). It is not assigned to a business object but active server-wide.
The class implements two methods: authenticate(...) validates the credentials, refreshAuthentication(...) renews an existing session.
package org.nuclet.handel;
import org.nuclos.api.rule.AuthenticationRule;
import org.nuclos.api.context.AuthenticationContext;
import org.nuclos.api.context.RefreshAuthenticationContext;
import org.nuclos.api.annotation.Rule;
import org.nuclos.api.exception.BusinessException;
import org.nuclos.api.authentication.*;
/** @name
* @description
* @usage
* @change
*/
@Rule(name="wer", description="werwr")
public class wer implements AuthenticationRule {
public AuthenticationResult authenticate(AuthenticationContext context) throws BusinessException {
}
public boolean refreshAuthentication(RefreshAuthenticationContext context) throws BusinessException {
}
}
Context: AuthenticationContext
The AuthenticationResult determines success/failure. The AuthenticationContext provides the user name and credentials.
Caution
Faulty authentication rules can block logins. Test thoroughly before production use.