Examples of SubjectDnX509PrincipalExtractor


Examples of org.springframework.security.web.authentication.preauth.x509.SubjectDnX509PrincipalExtractor

            AuthenticationManager authenticationManager) {
        if (x509AuthenticationFilter == null) {
            x509AuthenticationFilter = new X509AuthenticationFilter();
            x509AuthenticationFilter.setAuthenticationManager(authenticationManager);
            if(subjectPrincipalRegex != null) {
                SubjectDnX509PrincipalExtractor principalExtractor = new SubjectDnX509PrincipalExtractor();
                principalExtractor.setSubjectDnRegex(subjectPrincipalRegex);
                x509AuthenticationFilter.setPrincipalExtractor(principalExtractor);
            }
            if(authenticationDetailsSource != null) {
                x509AuthenticationFilter.setAuthenticationDetailsSource(authenticationDetailsSource);
            }
View Full Code Here

Examples of org.springframework.security.web.authentication.preauth.x509.SubjectDnX509PrincipalExtractor

public class SubjectDnX509PrincipalExtractorTests {
    SubjectDnX509PrincipalExtractor extractor;

    @Before
    public void setUp() {
        extractor = new SubjectDnX509PrincipalExtractor();
        extractor.setMessageSource(new SpringSecurityMessageSource());
    }
View Full Code Here

Examples of org.springframework.security.web.authentication.preauth.x509.SubjectDnX509PrincipalExtractor

            AuthenticationManager authenticationManager) {
        if (x509AuthenticationFilter == null) {
            x509AuthenticationFilter = new X509AuthenticationFilter();
            x509AuthenticationFilter.setAuthenticationManager(authenticationManager);
            if(subjectPrincipalRegex != null) {
                SubjectDnX509PrincipalExtractor principalExtractor = new SubjectDnX509PrincipalExtractor();
                principalExtractor.setSubjectDnRegex(subjectPrincipalRegex);
                x509AuthenticationFilter.setPrincipalExtractor(principalExtractor);
            }
            if(authenticationDetailsSource != null) {
                x509AuthenticationFilter.setAuthenticationDetailsSource(authenticationDetailsSource);
            }
View Full Code Here

Examples of org.springframework.security.web.authentication.preauth.x509.SubjectDnX509PrincipalExtractor

        super.initializeFromConfig(config);

//      not needed at the moment       
//        X509CertificateAuthenticationFilterConfig authConfig =
//                (X509CertificateAuthenticationFilterConfig) config;
        setPrincipalExtractor(new SubjectDnX509PrincipalExtractor());
       
    }
View Full Code Here

Examples of org.springframework.security.web.authentication.preauth.x509.SubjectDnX509PrincipalExtractor

                                            
            privateKS.store( new FileOutputStream(keyStoreFile), password.toCharArray())
      }
 
      private static boolean keyStoreContainsCertificate(KeyStore ks, String hostname) throws Exception{
          SubjectDnX509PrincipalExtractor ex = new SubjectDnX509PrincipalExtractor();
          Enumeration<String> e = ks.aliases();
          while (e.hasMoreElements()) {
              String alias = e.nextElement();
              if (ks.isCertificateEntry(alias)) {
                  Certificate c =  ks.getCertificate(alias);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.