Package org.switchyard.security.credential

Examples of org.switchyard.security.credential.ConfidentialityCredential


        Set<Credential> credentials = new HashSet<Credential>();
        if (_servletRequest != null) {
            credentials.addAll(SecurityServices.getServletRequestCredentialExtractor().extract(_servletRequest));
        } else {
            if (_secured) {
                credentials.add(new ConfidentialityCredential(true));
            }
            if (_principal != null) {
                credentials.add(new PrincipalCredential(_principal, true));
            }
            String charsetName = null;
View Full Code Here


    }

    @Override
    public Set<Credential> extractCredentials() {
        Set<Credential> credentials = new HashSet<Credential>();
        credentials.add(new ConfidentialityCredential(true));
        return credentials;
    }
View Full Code Here

        childGroup.addMember(role);
        parentGroup.addMember(childGroup);
        Set<Credential> creds = new LinkedHashSet<Credential>();
        creds.add(new AssertionCredential(new ElementPuller().pull(new StringReader("<testAssertion/>"))));
        creds.add(SOAPMessageCredentialExtractorTests.getBinarySecurityTokenCertificateCredential());
        creds.add(new ConfidentialityCredential(true));
        creds.add(new ConfidentialityCredential(false));
        creds.add(new NameCredential("testName"));
        creds.add(new PasswordCredential("testPassword"));
        creds.add(new PrincipalCredential(user, true));
        creds.add(new PrincipalCredential(role, false));
        creds.add(new PrincipalCredential(childGroup, true));
View Full Code Here

     */
    @Override
    public Set<Credential> extract(SSLSession source) {
        Set<Credential> credentials = new HashSet<Credential>();
        try {
            credentials.add(new ConfidentialityCredential(source.isValid()));
            credentials.add(new PrincipalCredential(source.getPeerPrincipal()));
            credentials.add(new CertificateCredential(source.getPeerCertificates()[0]));
        } catch (SSLPeerUnverifiedException e) {
            throw BaseSecurityMessages.MESSAGES.unableToExtractCredentials(e.getMessage(), e);
        }
View Full Code Here

    public Set<Credential> extract(HttpExchange source) {
        Set<Credential> credentials = new HashSet<Credential>();
        if (source != null) {
            String protocol = source.getProtocol();
            if (protocol != null) {
                credentials.add(new ConfidentialityCredential(protocol.toLowerCase().startsWith("https")));
            }
            Principal principal = source.getPrincipal();
            if (principal != null) {
                credentials.add(new PrincipalCredential(principal, true));
            }
View Full Code Here

    @Override
    public Set<Credential> extract(ServletRequest source) {
        Set<Credential> credentials = new HashSet<Credential>();
        if (source != null) {
            if (source.isSecure()) {
                credentials.add(new ConfidentialityCredential(true));
            }
            if (source instanceof HttpServletRequest) {
                HttpServletRequest request = (HttpServletRequest)source;
                Principal userPrincipal = request.getUserPrincipal();
                if (userPrincipal != null) {
View Full Code Here

TOP

Related Classes of org.switchyard.security.credential.ConfidentialityCredential

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.