1 21 22 package org.apache.derby.impl.jdbc.authentication; 23 24 import org.apache.derby.iapi.error.StandardException; 25 import org.apache.derby.iapi.services.property.PropertyUtil; 26 27 import org.apache.derby.iapi.jdbc.AuthenticationService; 28 import org.apache.derby.authentication.UserAuthenticator; 29 30 import org.apache.derby.iapi.util.StringUtil; 31 32 import java.util.Properties ; 33 34 45 46 public class JNDIAuthenticationService 47 extends AuthenticationServiceBase { 48 49 private String authenticationProvider; 50 51 55 public JNDIAuthenticationService() { 57 super(); 58 } 59 60 64 67 public boolean canSupport(Properties properties) { 68 69 if (!requireAuthentication(properties)) 70 return false; 71 72 81 authenticationProvider = PropertyUtil.getPropertyFromSet( 82 properties, 83 org.apache.derby.iapi.reference.Property.AUTHENTICATION_PROVIDER_PARAMETER); 84 85 if ( (authenticationProvider != null) && 86 (StringUtil.SQLEqualsIgnoreCase(authenticationProvider, 87 org.apache.derby.iapi.reference.Property.AUTHENTICATION_PROVIDER_LDAP))) 88 return true; 89 90 return false; 91 } 92 93 98 public void boot(boolean create, Properties properties) 99 throws StandardException { 100 101 104 super.boot(create, properties); 106 107 110 UserAuthenticator aJNDIAuthscheme; 113 114 aJNDIAuthscheme = new LDAPAuthenticationSchemeImpl(this, properties); 116 this.setAuthenticationService(aJNDIAuthscheme); 117 } 118 } 119 | Popular Tags |