| Auszug |
|---|
|
Nuclos authentication rule: custom login authentication (LDAP/SSO), authenticate(), refreshAuthentication(), AuthenticationContext. |
Language: Deutsch · English
Event - Authentication rule
Custom authentication at login – e.g. against LDAP, SSO or a REST service.
| Status |
|---|
| colour | Green |
|---|
| title | Updated: Jul 2026 |
|---|
|
| Status |
|---|
| colour | Grey |
|---|
| title | applies to Nuclos 4.2026.x |
|---|
|
When does the rule fire?
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.
Structure
The class implements two methods: authenticate(...) validates the credentials, refreshAuthentication(...) renews an existing session.
| Codeblock |
|---|
|
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 {
}
} |
| Info |
|---|
| title | Context: AuthenticationContext |
|---|
|
The AuthenticationResult determines success/failure. The AuthenticationContext provides the user name and credentials. |
| Warnung |
|---|
|
Faulty authentication rules can block logins. Test thoroughly before production use. |
Related pages
Server-side rules
Basics.
Open →