Examples of transportGuarantee()


Examples of io.undertow.servlet.api.AuthorizationManager.transportGuarantee()

        Deployment deployment = servletRequestContext.getDeployment();
        final AuthorizationManager authorizationManager = deployment.getDeploymentInfo().getAuthorizationManager();

        TransportGuaranteeType connectionGuarantee = servletRequestContext.getOriginalRequest().isSecure() ? TransportGuaranteeType.CONFIDENTIAL : TransportGuaranteeType.NONE;

        TransportGuaranteeType transportGuarantee = authorizationManager.transportGuarantee(connectionGuarantee, configuredGuarantee, servletRequestContext.getOriginalRequest());

        // TODO - We may be able to add more flexibility here especially with authentication mechanisms such as Digest for
        // INTEGRAL - for now just use SSL.
        return (TransportGuaranteeType.CONFIDENTIAL == transportGuarantee || TransportGuaranteeType.INTEGRAL == transportGuarantee);
    }
View Full Code Here

Examples of io.undertow.servlet.api.AuthorizationManager.transportGuarantee()

    public void handleRequest(HttpServerExchange exchange) throws Exception {
        final ServletRequestContext servletRequestContext = exchange.getAttachment(ServletRequestContext.ATTACHMENT_KEY);
        final AuthorizationManager authorizationManager = servletRequestContext.getDeployment().getDeploymentInfo().getAuthorizationManager();

        TransportGuaranteeType connectionGuarantee = servletRequestContext.getOriginalRequest().isSecure() ? TransportGuaranteeType.CONFIDENTIAL : TransportGuaranteeType.NONE;
        TransportGuaranteeType transportGuarantee = authorizationManager.transportGuarantee(connectionGuarantee,
                servletRequestContext.getTransportGuarenteeType(), servletRequestContext.getOriginalRequest());
        servletRequestContext.setTransportGuarenteeType(transportGuarantee);

        if (TransportGuaranteeType.REJECTED == transportGuarantee) {
            HttpServletResponse response = (HttpServletResponse) servletRequestContext.getServletResponse();
View Full Code Here

Examples of io.undertow.servlet.api.AuthorizationManager.transportGuarantee()

    public void handleRequest(HttpServerExchange exchange) throws Exception {
        final ServletRequestContext servletRequestContext = exchange.getAttachment(ServletRequestContext.ATTACHMENT_KEY);
        final AuthorizationManager authorizationManager = servletRequestContext.getDeployment().getDeploymentInfo().getAuthorizationManager();

        TransportGuaranteeType connectionGuarantee = servletRequestContext.getOriginalRequest().isSecure() ? TransportGuaranteeType.CONFIDENTIAL : TransportGuaranteeType.NONE;
        TransportGuaranteeType transportGuarantee = authorizationManager.transportGuarantee(connectionGuarantee,
                servletRequestContext.getTransportGuarenteeType(), servletRequestContext.getOriginalRequest());
        servletRequestContext.setTransportGuarenteeType(transportGuarantee);

        if (TransportGuaranteeType.REJECTED == transportGuarantee) {
            HttpServletResponse response = (HttpServletResponse) servletRequestContext.getServletResponse();
View Full Code Here

Examples of io.undertow.servlet.api.AuthorizationManager.transportGuarantee()

    public void handleRequest(HttpServerExchange exchange) throws Exception {
        final ServletRequestContext servletRequestContext = exchange.getAttachment(ServletRequestContext.ATTACHMENT_KEY);
        final AuthorizationManager authorizationManager = servletRequestContext.getDeployment().getDeploymentInfo().getAuthorizationManager();

        TransportGuaranteeType connectionGuarantee = servletRequestContext.getOriginalRequest().isSecure() ? TransportGuaranteeType.CONFIDENTIAL : TransportGuaranteeType.NONE;
        TransportGuaranteeType transportGuarantee = authorizationManager.transportGuarantee(connectionGuarantee,
                servletRequestContext.getTransportGuarenteeType(), servletRequestContext.getOriginalRequest());
        servletRequestContext.setTransportGuarenteeType(transportGuarantee);

        if (TransportGuaranteeType.REJECTED == transportGuarantee) {
            HttpServletResponse response = (HttpServletResponse) servletRequestContext.getServletResponse();
View Full Code Here

Examples of io.undertow.servlet.api.AuthorizationManager.transportGuarantee()

    public void handleRequest(HttpServerExchange exchange) throws Exception {
        final ServletRequestContext servletRequestContext = exchange.getAttachment(ServletRequestContext.ATTACHMENT_KEY);
        final AuthorizationManager authorizationManager = servletRequestContext.getDeployment().getDeploymentInfo().getAuthorizationManager();

        TransportGuaranteeType connectionGuarantee = servletRequestContext.getOriginalRequest().isSecure() ? TransportGuaranteeType.CONFIDENTIAL : TransportGuaranteeType.NONE;
        TransportGuaranteeType transportGuarantee = authorizationManager.transportGuarantee(connectionGuarantee,
                servletRequestContext.getTransportGuarenteeType(), servletRequestContext.getOriginalRequest());
        servletRequestContext.setTransportGuarenteeType(transportGuarantee);

        if (TransportGuaranteeType.REJECTED == transportGuarantee) {
            HttpServletResponse response = (HttpServletResponse) servletRequestContext.getServletResponse();
View Full Code Here

Examples of javax.servlet.annotation.HttpConstraint.transportGuarantee()

                        String httpMethod = httpMethodConstraint.value().trim();
                        omissionMethods[iIndex++] = httpMethod;
                        addNewHTTPMethodSecurityConstraint(annotationSecurityWebApp, httpMethodConstraint.rolesAllowed(), httpMethodConstraint.transportGuarantee(), httpMethodConstraint
                                .emptyRoleSemantic(), httpMethod, urlPatterns);
                    }
                    addNewHTTPSecurityConstraint(annotationSecurityWebApp, httpConstraint.rolesAllowed(), httpConstraint.transportGuarantee(), httpConstraint.value(), omissionMethods, urlPatterns);
                } else {
                    addNewHTTPSecurityConstraint(annotationSecurityWebApp, httpConstraint.rolesAllowed(), httpConstraint.transportGuarantee(), httpConstraint.value(), new String[] {}, urlPatterns);
                }
            }
        } catch (ClassNotFoundException e) {
View Full Code Here

Examples of javax.servlet.annotation.HttpConstraint.transportGuarantee()

                        addNewHTTPMethodSecurityConstraint(annotationSecurityWebApp, httpMethodConstraint.rolesAllowed(), httpMethodConstraint.transportGuarantee(), httpMethodConstraint
                                .emptyRoleSemantic(), httpMethod, urlPatterns);
                    }
                    addNewHTTPSecurityConstraint(annotationSecurityWebApp, httpConstraint.rolesAllowed(), httpConstraint.transportGuarantee(), httpConstraint.value(), omissionMethods, urlPatterns);
                } else {
                    addNewHTTPSecurityConstraint(annotationSecurityWebApp, httpConstraint.rolesAllowed(), httpConstraint.transportGuarantee(), httpConstraint.value(), new String[] {}, urlPatterns);
                }
            }
        } catch (ClassNotFoundException e) {
            //Should never occur, as webservice builder  have already checked it.
            logger.error("Fail to load class", e);
View Full Code Here

Examples of javax.servlet.annotation.HttpConstraint.transportGuarantee()

            SecurityConstraint securityConstraint =
                    createSecurityConstraint(webBundleDesc,
                    urlPatterns, httpConstraint.rolesAllowed(),
                    httpConstraint.value(),
                    httpConstraint.transportGuarantee(),
                    null);

            // we know there is one WebResourceCollection there
            WebResourceCollection webResColl =
                    securityConstraint.getWebResourceCollections().iterator().next();
View Full Code Here

Examples of javax.servlet.annotation.HttpConstraint.transportGuarantee()

            SecurityConstraint securityConstraint =
                    createSecurityConstraint(webBundleDesc,
                    urlPatterns, httpConstraint.rolesAllowed(),
                    httpConstraint.value(),
                    httpConstraint.transportGuarantee(),
                    null);

            // we know there is one WebResourceCollection there
            WebResourceCollection webResColl =
                    securityConstraint.getWebResourceCollections().iterator().next();
View Full Code Here

Examples of javax.servlet.annotation.HttpConstraint.transportGuarantee()

      ServletSecurityMetaData metaData = new ServletSecurityMetaData();
      HttpConstraint httpConstraint = servletSecurity.value();
      HttpMethodConstraint[] httpMethodConstraints = servletSecurity.httpMethodConstraints();
     
      metaData.setEmptyRoleSemantic(EmptyRoleSemanticType.valueOf(httpConstraint.value().toString()));
      metaData.setTransportGuarantee(TransportGuaranteeType.valueOf(httpConstraint.transportGuarantee().toString()));
      List<String> rolesAllowed = new ArrayList<String>();
      for (String role : httpConstraint.rolesAllowed())
      {
         rolesAllowed.add(role);
      }
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.