protected LdapAuthConfiguration getLdapAuthConfiguration() { return this.getLdapConfiguration().getLdapAuthConfiguration(); }
/** * Retrieves the current (in-effect) LDAP connection info. */ @Override @GET @ResourceMethodSignature(output = LdapConnectionInfoResponse.class) public Object get(Context context, Request request, Response response, Variant variant) throws ResourceException { // this could be null, if so do we want to return defaults? I would guess no... CConnectionInfo connInfo = this.getConfiguration().readConnectionInfo(); LdapConnectionInfoResponse result = new LdapConnectionInfoResponse(); result.setData(this.ldapToRestModel(connInfo)); return result; }
/** * Returns the user and groups mapping that are currently in-effect. */ @Override @GET @ResourceMethodSignature(output = LdapUserAndGroupConfigurationResponse.class) public Object get(Context context, Request request, Response response, Variant variant) throws ResourceException { // this could be null, if so do we want to return defaults? I would guess no... CUserAndGroupAuthConfiguration userGroupConf = this.getConfiguration().readUserAndGroupConfiguration(); LdapUserAndGroupConfigurationResponse result = new LdapUserAndGroupConfigurationResponse(); // convert and set the info in the result if (userGroupConf != null) { result.setData(this.ldapToRestModel(userGroupConf)); } return result; }
String authScheme = this.getLdapConfiguration().readConnectionInfo().getAuthScheme(); .getLdapConfiguration().readUserAndGroupConfiguration().getUserPasswordAttribute() ) )
this.getConfiguration().updateConnectionInfo( connInfo ); this.getConfiguration().save();
this.getConfiguration().updateUserAndGroupConfiguration( userGroupConf ); this.getConfiguration().save();
final Configuration configuration = source.getConfiguration();
LdapUser ldapUser = this.getUser(userId); String authScheme = this.getLdapConfiguration().readConnectionInfo().getAuthScheme(); .getLdapConfiguration().readUserAndGroupConfiguration().getUserPasswordAttribute())) {
try { this.getConfiguration().updateConnectionInfo(connInfo); this.getConfiguration().save();
try { this.getConfiguration().updateUserAndGroupConfiguration(userGroupConf); this.getConfiguration().save();
/** * Retrieves the current (in-effect) LDAP connection info. */ @Override @GET @ResourceMethodSignature( output = LdapConnectionInfoResponse.class ) public Object get( Context context, Request request, Response response, Variant variant ) throws ResourceException { // this could be null, if so do we want to return defaults? I would guess no... CConnectionInfo connInfo = this.getConfiguration().readConnectionInfo(); LdapConnectionInfoResponse result = new LdapConnectionInfoResponse(); result.setData( this.ldapToRestModel( connInfo ) ); return result; }
protected LdapAuthConfiguration getLdapAuthConfiguration() { return this.getLdapConfiguration().getLdapAuthConfiguration(); }
/** * Returns the user and groups mapping that are currently in-effect. */ @Override @GET @ResourceMethodSignature( output = LdapUserAndGroupConfigurationResponse.class ) public Object get( Context context, Request request, Response response, Variant variant ) throws ResourceException { // this could be null, if so do we want to return defaults? I would guess no... CUserAndGroupAuthConfiguration userGroupConf = this.getConfiguration().readUserAndGroupConfiguration(); LdapUserAndGroupConfigurationResponse result = new LdapUserAndGroupConfigurationResponse(); // convert and set the info in the result if ( userGroupConf != null ) { result.setData( this.ldapToRestModel( userGroupConf ) ); } return result; }
if (this.getLdapConfiguration() == null || this.getLdapConfiguration().readConnectionInfo() == null) { throw new LdapDAOException("Ldap connection is not configured."); CConnectionInfo connInfo = this.getLdapConfiguration().readConnectionInfo();
if ( this.getLdapConfiguration() == null || this.getLdapConfiguration().readConnectionInfo() == null ) CConnectionInfo connInfo = this.getLdapConfiguration().readConnectionInfo();
protected CConnectionInfo restToLdapModel(LdapConnectionInfoDTO restConnInfo) { CConnectionInfo connInfo = new CConnectionInfo(); connInfo.setAuthScheme(restConnInfo.getAuthScheme()); connInfo.setHost(restConnInfo.getHost()); connInfo.setPort(restConnInfo.getPort()); connInfo.setProtocol(restConnInfo.getProtocol()); connInfo.setSearchBase(restConnInfo.getSearchBase()); connInfo.setSystemUsername(restConnInfo.getSystemUsername()); connInfo.setRealm(restConnInfo.getRealm()); // check if the request was sent with a password other then the FAKE one // if we get the fake one we need to grab the real password from the configuration. // if its something different we can update it. if (FAKE_PASSWORD.equals(restConnInfo.getSystemPassword())) { if (this.getConfiguration().readConnectionInfo() != null) { connInfo.setSystemPassword(this.getConfiguration().readConnectionInfo().getSystemPassword()); } } else { connInfo.setSystemPassword(restConnInfo.getSystemPassword()); } return connInfo; }
private CConnectionInfo getConnectionInfo(LdapUserAndGroupConfigTestRequestDTO dto) { CConnectionInfo connInfo = new CConnectionInfo(); connInfo.setAuthScheme(dto.getAuthScheme()); connInfo.setHost(dto.getHost()); connInfo.setPort(dto.getPort()); connInfo.setProtocol(dto.getProtocol()); connInfo.setSearchBase(dto.getSearchBase()); connInfo.setSystemUsername(dto.getSystemUsername()); connInfo.setRealm(dto.getRealm()); // TODO: this is duplicated until the UI can send both objects in // check if the request was sent with a password other then the FAKE one // if we get the fake one we need to grab the real password from the configuration. // if its something different we can update it. if (FAKE_PASSWORD.equals(dto.getSystemPassword())) { if (this.getConfiguration().readConnectionInfo() != null) { connInfo.setSystemPassword(this.getConfiguration().readConnectionInfo().getSystemPassword()); } } else { connInfo.setSystemPassword(dto.getSystemPassword()); } return connInfo; }
protected CConnectionInfo restToLdapModel( LdapConnectionInfoDTO restConnInfo ) { CConnectionInfo connInfo = new CConnectionInfo(); connInfo.setAuthScheme( restConnInfo.getAuthScheme() ); connInfo.setHost( restConnInfo.getHost() ); connInfo.setPort( restConnInfo.getPort() ); connInfo.setProtocol( restConnInfo.getProtocol() ); connInfo.setSearchBase( restConnInfo.getSearchBase() ); connInfo.setSystemUsername( restConnInfo.getSystemUsername() ); connInfo.setRealm( restConnInfo.getRealm() ); // check if the request was sent with a password other then the FAKE one // if we get the fake one we need to grab the real password from the configuration. // if its something different we can update it. if ( FAKE_PASSWORD.equals( restConnInfo.getSystemPassword() ) ) { if ( this.getConfiguration().readConnectionInfo() != null ) { connInfo.setSystemPassword( this.getConfiguration().readConnectionInfo().getSystemPassword() ); } } else { connInfo.setSystemPassword( restConnInfo.getSystemPassword() ); } return connInfo; }
private CConnectionInfo getConnectionInfo( LdapUserAndGroupConfigTestRequestDTO dto ) { CConnectionInfo connInfo = new CConnectionInfo(); connInfo.setAuthScheme( dto.getAuthScheme() ); connInfo.setHost( dto.getHost() ); connInfo.setPort( dto.getPort() ); connInfo.setProtocol( dto.getProtocol() ); connInfo.setSearchBase( dto.getSearchBase() ); connInfo.setSystemUsername( dto.getSystemUsername() ); connInfo.setRealm( dto.getRealm() ); // TODO: this is duplicated until the UI can send both objects in // check if the request was sent with a password other then the FAKE one // if we get the fake one we need to grab the real password from the configuration. // if its something different we can update it. if ( FAKE_PASSWORD.equals( dto.getSystemPassword() ) ) { if ( this.getConfiguration().readConnectionInfo() != null ) { connInfo.setSystemPassword( this.getConfiguration().readConnectionInfo().getSystemPassword() ); } } else { connInfo.setSystemPassword( dto.getSystemPassword() ); } return connInfo; }