Examples of verifyAuthentication()


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

        prop.put("channel_description", "");
        prop.put("channel_pubDate", "");
        prop.put("item", "0");

        if ((post == null) || (env == null)) return prop;
        final boolean authorized = sb.verifyAuthentication(header, false);

        final String channelNames = post.get("set");
        if (channelNames == null) return prop;
        final String[] channels = channelNames.split(","); // several channel names can be given and separated by comma
View Full Code Here

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

            }
        }
       
        if (post != null && post.containsKey("access")) {
            // only the administrator may change the access right
            if (!sb.verifyAuthentication(header, true)) {
                // check access right for admin
                prop.put("AUTHENTICATE", "admin log-in"); // force log-in
                return prop;
            }
           
View Full Code Here

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

        WikiBoard.Entry page = sb.wikiDB.read(pagename);
       
        if (post != null && post.containsKey("submit")) {
           
            if ((access.equals("admin") && (!sb.verifyAuthentication(header, true)))) {
                // check access right for admin
                prop.put("AUTHENTICATE", "admin log-in"); // force log-in
                return prop;
            }
           
View Full Code Here

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

            prop.putHTML("LOCATION", "/Wiki.html?page=" + pagename);
            prop.put("LOCATION", prop.get("LOCATION"));
        }
       
        if (post != null && post.containsKey("edit")) {
            if ((access.equals("admin") && (!sb.verifyAuthentication(header, true)))) {
                // check access right for admin
                prop.put("AUTHENTICATE", "admin log-in"); // force log-in
                return prop;
            }
           
View Full Code Here

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

        if (tabletype != EventOrigin.UNKNOWN ||
            (post != null && (post.containsKey("clearlist") ||
            post.containsKey("deleteentry")))) {
            final String authorization = (header.get(RequestHeader.AUTHORIZATION, "xxxxxx"));
            if (authorization.length() != 0) {
                if (! sb.verifyAuthentication(header, true)){
                    // force log-in (again, because wrong password was given)
                    prop.put("AUTHENTICATE", "admin log-in");
                    return prop;
                }
            } else {
View Full Code Here

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

    }

    public static serverObjects respond(final RequestHeader header, serverObjects post, final serverSwitch env) {
        final Switchboard sb = (Switchboard) env;
        final serverObjects prop = new serverObjects();
        boolean hasRights = sb.verifyAuthentication(header, true);

        prop.put("mode_admin", hasRights ? "1" : "0");

        if (post == null) {
            post = new serverObjects();
View Full Code Here

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

public class YMarks {
  public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
        final Switchboard sb = (Switchboard) env;
        final serverObjects prop = new serverObjects();
        final UserDB.Entry user = sb.userDB.getUser(header);
        final boolean isAdmin = (sb.verifyAuthentication(header, true));
        final boolean isAuthUser = user!= null && user.hasRight(UserDB.AccessRight.BOOKMARK_RIGHT);
       
        if(isAdmin || isAuthUser) {
          prop.put("login", 1);
          String bmk_user = (isAuthUser ? user.getUserName() : YMarkTables.USER_ADMIN);
View Full Code Here

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

                    percent=(int)((float)used/(float)limit*100);
                prop.put("logged-in_limit_percent", percent/3);
                prop.put("logged-in_limit_percent2", (100-percent)/3);
            }
        //logged in via static Password
        }else if(sb.verifyAuthentication(requestHeader, true)){
            prop.put("logged-in", "2");
        //identified via form-login
        //TODO: this does not work for a static admin, yet.
        }else if(post != null && post.containsKey("username") && post.containsKey("password")){
            final String username=post.get("username");
View Full Code Here

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

        prop.put("info", "0"); //no information submitted

        final String requestIP = post.get(HeaderFramework.CONNECTION_PROP_CLIENTIP, "127.0.0.1");
       
        // handle access rights
        if (!sb.verifyAuthentication(header, false)) {
            Log.logInfo("STEERING", "log-in attempt for steering from " + requestIP);
            prop.put("AUTHENTICATE", "admin log-in"); // force 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
        boolean publicPage = sb.getConfigBool("publicSurftips", true);
        final boolean authorizedAccess = sb.verifyAuthentication(header, false);
        if ((post != null) && (post.containsKey("publicPage"))) {
            if (!authorizedAccess) {
                prop.put("AUTHENTICATE", "admin log-in"); // force log-in
                return prop;
            }
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.