Package org.apache.sling.engine.impl.auth

Examples of org.apache.sling.engine.impl.auth.SlingAuthenticator


                + productVersion);
        }

        // setup servlet request processing helpers
        SlingServletContext tmpServletContext = new SlingServletContext(this);
        slingAuthenticator = new SlingAuthenticator(bundleContext);

        // register the servlet and resources
        try {
            Dictionary<String, String> servletConfig = toStringConfig(configuration);
View Full Code Here


     * a 503/SERVICE UNAVAILABLE status back to the client.
     */
    public boolean handleSecurity(HttpServletRequest request,
            HttpServletResponse response) throws IOException {

        SlingAuthenticator authenticator = slingAuthenticator;
        if (authenticator != null) {
            try {

                return authenticator.authenticate(request, response);

            } catch (MissingRepositoryException mre) {

                log.error("handleSecurity: Cannot authenticate request: "
                    + mre.getMessage());
View Full Code Here

            componentConfig.get(PROP_MAX_CALL_COUNTER),
            RequestData.DEFAULT_MAX_CALL_COUNTER));
       
        // setup servlet request processing helpers
        SlingServletContext tmpServletContext = new SlingServletContext(this);
        slingAuthenticator = new SlingAuthenticator(bundleContext);

        // register the servlet and resources
        try {
            Dictionary<String, String> servletConfig = toStringConfig(configuration);
View Full Code Here

     * a 503/SERVICE UNAVAILABLE status back to the client.
     */
    public boolean handleSecurity(HttpServletRequest request,
            HttpServletResponse response) throws IOException {

        SlingAuthenticator authenticator = slingAuthenticator;
        if (authenticator != null) {
            try {

                // SLING-559: ensure correct parameter handling according to
                // ParameterSupport
                request = new HttpServletRequestWrapper(request) {
                    @Override
                    public String getParameter(String name) {
                        return getParameterSupport().getParameter(name);
                    }

                    @Override
                    public Map<String, String[]> getParameterMap() {
                        return getParameterSupport().getParameterMap();
                    }

                    @Override
                    public Enumeration<String> getParameterNames() {
                        return getParameterSupport().getParameterNames();
                    }

                    @Override
                    public String[] getParameterValues(String name) {
                        return getParameterSupport().getParameterValues(name);
                    }

                    private ParameterSupport getParameterSupport() {
                        return ParameterSupport.getInstance(getRequest());
                    }
                };

                return authenticator.authenticate(request, response);

            } catch (MissingRepositoryException mre) {

                log.error("handleSecurity: Cannot authenticate request: "
                    + mre.getMessage());
View Full Code Here

TOP

Related Classes of org.apache.sling.engine.impl.auth.SlingAuthenticator

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.