Coder Social home page Coder Social logo

vraptor-shiro's People

Contributors

bitdeli-chef avatar dipold avatar turini avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vraptor-shiro's Issues

UnavailableSecurityManagerException - No SecurityManager accessible to the calling code, either bound to the org.apache.shiro.util.ThreadContext or as a vm static singleton.

Strange behavior: org.apache.shiro.UnavailableSecurityManagerException blows up when trying to access @secured methods, but it stops after a sequence of user's actions.

 No SecurityManager accessible to the calling code, either bound to the org.apache.shiro.util.ThreadContext or as a vm static singleton.

Details described in this forum thread in pt-br (GUJ):

http://www.guj.com.br/java/308952-vraptor-4--apache-shiro--unavailablesecuritymanagerexception

SecurityManager initialization

I'm trying to use vraptor-shiro (using vraptor4) but I think that SecurityFacade class should be loaded when the application starts running. But as the initial config aren't being setup, even methods annotated with @secured and @RequiresAuthentication aren't being intercepted.

I suppose we need to create some VRaptorInitialized Observer to start shiro setup or I'm doing something wrong.

SessionControl not accurate

As Alberto Magno Xavier Soares said in this thread (pt-br), the VRaptor plugin is not working as expected. What happens, in my case, the user gets logged off after some request to an @Secured resource.

Subject doesn't return principals (like username)

I tried <shiro:principal/> and it returns object name. <shiro:principal property="username"/> and it returns nothing.
I also tried to @Inject Subject into vraptor @Controller, and it returns this:

        logger.debug("Subject: " + subject.toString());
\\2015-12-22 18:18:16,481 DEBUG [IndexController     ] (IndexController.java:46) - Subject: br.com.caelum.vraptor.security.produces.SafeSubject@56ce277b
        logger.debug("Subject principal: " + subject.getPrincipal().toString());
\\User object description, instead of name

I guess this is a problem with vraptor-shiro plugin.

Apos Verificar que o usuário não esta autenticado as lógica do controller é executada

O interceptor após verificar que o usuário não esta autenticado continua a execução da lógica do controller mesmo depois que a vraptor ja redirecionou para tela de login.
Entendo que o cdx.proceed(); deveria ser invocado dentro do try.

@AroundInvoke public Object check(InvocationContext ctx) throws Exception { try { assertAuthorized(new InvocationContextToMethodInvocationConverter(ctx)); } catch(AuthorizationException e) { listener.onAuthorizationRestriction(e); } return ctx.proceed(); }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.