Package org.apache.marmotta.platform.core.exception.security

Examples of org.apache.marmotta.platform.core.exception.security.AccessDeniedException


                if(securityService.grantAccess(httpRequest)) {
                    chain.doFilter(request,response);
                } else
                    // handled by LMFAuthenticationFilter
                    throw new AccessDeniedException();
            }
        } else {
            chain.doFilter(request,response);
        }
    }
View Full Code Here


    public Response login(@HeaderParam("Referer") String ref, @QueryParam("logout") @DefaultValue("false") boolean logout,
                          @QueryParam("user") String login) {
        // Check whether we want to logout
        if (logout) {
            userService.setCurrentUser(userService.getAnonymousUser());
            throw new AccessDeniedException();
        }

        // Anonymous cannot login
        if (userService.isAnonymous(userService.getCurrentUser())) throw new AccessDeniedException();

        // Check whether this is the right (desired) user
        if (login != null && !userService.getCurrentUser().equals(userService.getUser(login))) throw new AccessDeniedException();

        if (ref == null || "".equals(ref)) {
            ref = configurationService.getServerUri() + configurationService.getStringConfiguration("kiwi.pages.startup");
        }
        return Response.seeOther(java.net.URI.create(ref)).build();
View Full Code Here

    public Response login(@HeaderParam("Referer") String ref, @QueryParam("logout") @DefaultValue("false") boolean logout,
                          @QueryParam("user") String login) {
        // Check whether we want to logout
        if (logout) {
            userService.setCurrentUser(userService.getAnonymousUser());
            throw new AccessDeniedException();
        }

        // Anonymous cannot login
        if (userService.isAnonymous(userService.getCurrentUser())) throw new AccessDeniedException();

        // Check whether this is the right (desired) user
        if (login != null && !userService.getCurrentUser().equals(userService.getUser(login))) throw new AccessDeniedException();

        if (ref == null || "".equals(ref)) {
            ref = configurationService.getServerUri() + configurationService.getStringConfiguration("kiwi.pages.startup");
        }
        return Response.seeOther(java.net.URI.create(ref)).build();
View Full Code Here

                            }
                        }
                    }
                    if (!authSuccess && !login.equals(Namespaces.ANONYMOUS_LOGIN)) {
                        // Apparently wrong username/passwd: ask for the correct one
                        throw new AccessDeniedException();
                    }
                }

                chain.doFilter(request,response);
            } catch(AccessDeniedException ex) {
View Full Code Here

    public Response login(@HeaderParam("Referer") String ref, @QueryParam("logout") @DefaultValue("false") boolean logout,
                          @QueryParam("user") String login) {
        // Check whether we want to logout
        if (logout) {
            userService.setCurrentUser(userService.getAnonymousUser());
            throw new AccessDeniedException();
        }

        // Anonymous cannot login
        if (userService.isAnonymous(userService.getCurrentUser())) throw new AccessDeniedException();

        // Check whether this is the right (desired) user
        if (login != null && !userService.getCurrentUser().equals(userService.getUser(login))) throw new AccessDeniedException();

        if (ref == null || "".equals(ref)) {
            ref = configurationService.getServerUri() + configurationService.getStringConfiguration("kiwi.pages.startup");
        }
        return Response.seeOther(java.net.URI.create(ref)).build();
View Full Code Here

TOP

Related Classes of org.apache.marmotta.platform.core.exception.security.AccessDeniedException

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.