Package com.taobao.datasource.resource.security

Examples of com.taobao.datasource.resource.security.SecureIdentityLoginModule


        Element passwordElement = (Element) passwordPath.selectSingleNode(applicationPolicy);
        String password = passwordElement != null ? passwordElement.getTextTrim() : null;

        if (isNotBlank(name) && isNotBlank(username) && isNotBlank(password)) {
            SecureIdentityLoginModule module = new SecureIdentityLoginModule();
            module.setUserName(username);
            module.setPassword(password);
            result.put(name, module);
        }
    }
View Full Code Here


    localTxDataSource.setValidateOnMatch(dataSourceDO.isValidateOnMatch());
    localTxDataSource.setValidConnectionCheckerClassName(dataSourceDO.getValidConnectionCheckerClassName());
    //���ð�ȫ��
    String securityDomainName = dataSourceDO.getSecurityDomain();
    if (StringUtils.isNotBlank(securityDomainName)) {
      SecureIdentityLoginModule securityDomain = loginConfigFinder
          .get(securityDomainName);
      if (securityDomain != null) {
        localTxDataSource.setSecurityDomain(securityDomain);
      }
    }
View Full Code Here

        Element passwordElement = (Element) passwordPath.selectSingleNode(applicationPolicy);
        String password = passwordElement != null ? passwordElement.getTextTrim() : null;

        if (isNotBlank(name) && isNotBlank(username) && isNotBlank(password)) {
            SecureIdentityLoginModule module = new SecureIdentityLoginModule();
            module.setUserName(username);
            module.setPassword(password);
            result.put(name, module);
        }
    }
View Full Code Here

    localTxDataSource.setValidateOnMatch(dataSourceDO.isValidateOnMatch());
    localTxDataSource.setValidConnectionCheckerClassName(dataSourceDO.getValidConnectionCheckerClassName());
    //���ð�ȫ��
    String securityDomainName = dataSourceDO.getSecurityDomain();
    if (StringUtils.isNotBlank(securityDomainName)) {
      SecureIdentityLoginModule securityDomain = loginConfigFinder
          .get(securityDomainName);
      if (securityDomain != null) {
        localTxDataSource.setSecurityDomain(securityDomain);
      }
    }
View Full Code Here

public class LoginConfigParserTest {

    @Test
    public void testParse() throws Exception {
        SecureIdentityLoginModule module1 = new SecureIdentityLoginModule();
        module1.setUserName("taobao");
        module1.setPassword("46bede21694492800a944ca43198bb47");

        SecureIdentityLoginModule module2 = new SecureIdentityLoginModule();
        module2.setUserName("taobao");
        module2.setPassword("131ed685e7ff86d4");

        Map<String, SecureIdentityLoginModule> expected = new HashMap<String, SecureIdentityLoginModule>();
        expected.put("EncryptDB1Password", module1);
        expected.put("EncryptDBCPassword", module2);
View Full Code Here

        finder = new LoginConfigFinder();
    }

    @Test
    public void testGet() {
        SecureIdentityLoginModule expected = new SecureIdentityLoginModule();
        expected.setUserName("taobao");
        expected.setPassword("131ed685e7ff86d4");

        SecureIdentityLoginModule actual = finder.get("EncryptDBCPassword");
        assertEquals(expected, actual);
    }
View Full Code Here

        assertEquals(expected, actual);
    }

    @Test
    public void testFind() throws Exception {
        SecureIdentityLoginModule module1 = new SecureIdentityLoginModule();
        module1.setUserName("taobao");
        module1.setPassword("46bede21694492800a944ca43198bb47");
        SecureIdentityLoginModule module2 = new SecureIdentityLoginModule();
        module2.setUserName("taobao");
        module2.setPassword("46bede21694492800a944ca43198bb47");
        SecureIdentityLoginModule module3 = new SecureIdentityLoginModule();
        module3.setUserName("taobao");
        module3.setPassword("131ed685e7ff86d4");
        SecureIdentityLoginModule module4 = new SecureIdentityLoginModule();
        module4.setUserName("datac");
        module4.setPassword("-5434009b757fc478");

        Map<String, SecureIdentityLoginModule> expected = new HashMap<String, SecureIdentityLoginModule>();
        expected.put("EncryptDB1Password", module1);
        expected.put("EncryptDB2Password", module2);
        expected.put("EncryptDBCPassword", module3);
View Full Code Here

    private JdbcTemplate template;

    @Before
    public void setUp() throws Exception {
        SecureIdentityLoginModule securityDomain = new SecureIdentityLoginModule();
        securityDomain.setUserName("water");
        securityDomain.setPassword(SecureIdentityLoginModule.encode("water"));

        CachedConnectionManager ccm = new CachedConnectionManager();
        ccm.setTransactionManager(TxManager.getInstance());
        ccm.init();
View Full Code Here

TOP

Related Classes of com.taobao.datasource.resource.security.SecureIdentityLoginModule

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.