Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

  1. Enter the URL of your LDAP server at the Provider URL.

  2. Enter the corresponding parameters to your LDAP server under Optional Settings.

  3. Click Finish.

Options:
  • Optional Settings
    • Search Base - Defines where in the directory the LDAP search begins.
      • CN - commonName.
      • L - localityName.
      • ST - stateOrProvinceName.
      • O - organizationName.
      • OU - organizationalUnitName.
      • C - countryName.
      • STREET - streetAddress.
      • DC - domainComponent.
      • UID - userid.
    • Suffix - Root, data object at the top of an LDAP data structure.
    • Scurity Protocol - Optional Security Protocol (z.B. SASL, SSL).
    • Security Authentication - Standard Security Protocol (none / simple / SASL)
  • Test Connection - Personal username and password. Only required to test the connection.
Result:
  • Project Management > Business Objects - The class ExampleAuthorizationProvider.java is generated.

    package com.company.example.business;
    
    import com.xdev.security.authentication.CredentialsUsernamePassword;
    import com.xdev.security.authentication.ldap.LDAPConfiguration;
    import com.xdev.security.authentication.ldap.LDAPConfiguration.LDAPConfigurationBuilder;
    import com.xdev.security.authorization.AuthorizationConfiguration;
    import com.xdev.security.authorization.AuthorizationConfigurationProvider;
    import com.xdev.security.authorization.ldap.LDAPAuthorizationConfigurationProvider;
    
    public class ExampleAuthorizationConfigurationProvider implements AuthorizationConfigurationProvider {
    	public static ExampleAuthorizationConfigurationProvider New(CredentialsUsernamePassword credentials) {
    		return new ExampleAuthorizationConfigurationProvider(credentials);
    	}
    
    	private final CredentialsUsernamePassword credentials;
    	private AuthorizationConfiguration authorizationConfiguration;
    
    	private ExampleAuthorizationConfigurationProvider(CredentialsUsernamePassword credentials) {
    		this.credentials = credentials;
    	}
    
    	@Override
    	public AuthorizationConfiguration provideConfiguration() {
    		if (this.authorizationConfiguration == null) {
    			LDAPConfiguration ldapConfiguration = new LDAPConfigurationBuilder(
    					"ldap://192.168.86.8:389/dc=xdevsoftware,dc=local").searchBase("OU=SBSUsers,OU=Users,OU=MyBusiness")
    							.suffix("@XDEVSOFTWARE.LOCAL").securityAuthentication("simple").build();
    
    			this.authorizationConfiguration = new LDAPAuthorizationConfigurationProvider(ldapConfiguration,
    					this.credentials).provideConfiguration();
    		}
    
    		return this.authorizationConfiguration;
    	}
    }


  • No labels