Examples of verifyAuthentication()


Examples of de.anomic.search.Switchboard.verifyAuthentication()

        if ((publicPage) || (authorizedAccess)) {
       
            // read voting
            String hash;
            if ((post != null) && ((hash = post.get("voteNegative", null)) != null)) {
                if (!sb.verifyAuthentication(header, false)) {
                    prop.put("AUTHENTICATE", "admin log-in"); // force log-in
                    return prop;
                }
                // make new news message with voting
                if (sb.isRobinsonMode()) {
View Full Code Here

Examples of de.anomic.search.Switchboard.verifyAuthentication()

                    map.put("refid", post.get("refid", ""));
                    sb.peers.newsPool.publishMyNews(sb.peers.mySeed(), yacyNewsPool.CATEGORY_SURFTIPP_VOTE_ADD, map);
                }
            }
            if ((post != null) && ((hash = post.get("votePositive", null)) != null)) {
                if (!sb.verifyAuthentication(header, false)) {
                    prop.put("AUTHENTICATE", "admin log-in"); // force log-in
                    return prop;
                }
                // make new news message with voting
                final HashMap<String, String> map = new HashMap<String, String>();
View Full Code Here

Examples of de.anomic.search.Switchboard.verifyAuthentication()

    public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
        final Switchboard sb = (Switchboard) env;
        final serverObjects prop = new serverObjects();
        BlogBoard.BlogEntry page = null;

        boolean hasRights = sb.verifyAuthentication(header, true);
       
        //final int display = (hasRights || post == null) ? 1 : post.getInt("display", 0);
        //prop.put("display", display);  
        prop.put("display", 1); // Fixed to 1
View Full Code Here

Examples of de.anomic.search.Switchboard.verifyAuthentication()

        // if the url is given as clear text, the user must be authorized as admin
        // the license can be used also from non-authorized users

        String urlString = post.get("url", "");
        final String urlLicense = post.get("code", "");
        final boolean auth = (header.get(HeaderFramework.CONNECTION_PROP_CLIENTIP, "")).equals("localhost") || sb.verifyAuthentication(header, true); // handle access rights

        DigestURI url = null;
        if ((urlString.length() > 0) && (auth)) try {
            url = new DigestURI(urlString);
        } catch (final MalformedURLException e1) {
View Full Code Here

Examples of de.anomic.search.Switchboard.verifyAuthentication()

        final serverObjects prop = new serverObjects();
        final Switchboard sb = (Switchboard) env;

       
        if (post != null) {
            if (!sb.verifyAuthentication(header, false)) {
                // force log-in
                prop.put("AUTHENTICATE", "admin log-in");
                return prop;
            }
           
View Full Code Here

Examples of de.anomic.search.Switchboard.verifyAuthentication()

       
        final boolean showScore = ((post != null) && (post.containsKey("score")));
       
        // access control
        final boolean publicPage = sb.getConfigBool("publicSurftips", true);
        final boolean authorizedAccess = sb.verifyAuthentication(header, false);
       
        if ((publicPage) || (authorizedAccess)) {
       
            // read voting
            String hash;
View Full Code Here

Examples of de.anomic.search.Switchboard.verifyAuthentication()

        if ((publicPage) || (authorizedAccess)) {
       
            // read voting
            String hash;
            if ((post != null) && ((hash = post.get("voteNegative", null)) != null)) {
                if (!sb.verifyAuthentication(header, false)) {
                    prop.put("AUTHENTICATE", "admin log-in"); // force log-in
                    return prop;
                }
                // make new news message with voting
                if (!sb.isRobinsonMode()) {
View Full Code Here

Examples of de.anomic.search.Switchboard.verifyAuthentication()

                    map.put("refid", post.get("refid", ""));
                    sb.peers.newsPool.publishMyNews(sb.peers.mySeed(), yacyNewsPool.CATEGORY_SURFTIPP_VOTE_ADD, map);
                }
            }
            if ((post != null) && ((hash = post.get("votePositive", null)) != null)) {
                if (!sb.verifyAuthentication(header, false)) {
                    prop.put("AUTHENTICATE", "admin log-in"); // force log-in
                    return prop;
                }
                // make new news message with voting
                final HashMap<String, String> map = new HashMap<String, String>();
View Full Code Here

Examples of de.anomic.search.Switchboard.verifyAuthentication()

        //wikiCode wikiTransformer = new wikiCode(switchboard);
        final serverObjects prop = new serverObjects();
        Segment segment = null;
        boolean html = post != null && post.containsKey("html");
        prop.setLocalized(html);
        if (post != null && post.containsKey("segment") && sb.verifyAuthentication(header, false)) {
            segment = sb.indexSegments.segment(post.get("segment"));
        }
        if (segment == null) segment = sb.indexSegments.segment(Segments.Process.PUBLIC);
        prop.put("rejected", "0");
        //int showRejectedCount = 10;
View Full Code Here

Examples of de.anomic.search.Switchboard.verifyAuthentication()

        final serverObjects prop = new serverObjects();

        final String eventID = post.get("eventID", "");
        final boolean authenticated = sb.adminAuthenticated(header) >= 2;
        final int item = post.getInt("item", -1);
        final boolean auth = (header.get(HeaderFramework.CONNECTION_PROP_CLIENTIP, "")).equals("localhost") || sb.verifyAuthentication(header, true);
        final String path = header.get(HeaderFramework.CONNECTION_PROP_PATH);
        final boolean isHtml = path.endsWith(".html");
        final boolean isJson = path.endsWith(".json");

        // default settings for blank item
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.