struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Benedict <pbened...@apache.org>
Subject Re: Security judges
Date Thu, 10 Oct 2013 16:22:59 GMT
Sounds like what Spring Security has:
http://docs.spring.io/spring-security/site/docs/2.0.x/apidocs/org/springframework/security/vote/AuthenticatedVoter.html

Each request goes through a list of voters.

Paul


On Thu, Oct 10, 2013 at 2:50 AM, Lukasz Lenart <lukaszlenart@apache.org>wrote:

> 2013/10/10 Steven Benitez <steven.benitez@gmail.com>:
> > Yeah, I'm not a fan of the Judge name either. Guard is better, but I'm
> not
> > sure if it's best. What would the API look like?
>
> Not sure yet, something like this:
>
> public class SecurityGate {
>
>     private List<SecurityGuard> guards;
>
>     public void check(HttpServletRequest) {
>         for(SecurityGuard guard : guards) {
>            SecurityPass pass = guard.accept(HttpServletRequest);
>            if (pass.notAccepted()) {
>                throw new StrutsSecurityException(pass.getGuardMessage())
>           }
>         }
>     }
>
> }
>
>
> Regards
> --
> Ɓukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>


-- 
Cheers,
Paul

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message