You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by "Brian Demers (JIRA)" <ji...@apache.org> on 2016/12/20 17:44:58 UTC

[jira] [Commented] (SHIRO-314) Authorization ANTLR Grammar

    [ https://issues.apache.org/jira/browse/SHIRO-314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15764781#comment-15764781 ] 

Brian Demers commented on SHIRO-314:
------------------------------------

I was hacking on this idea last night, instead of using ANTLR Grammer I created some javax.el function mappings.  This is just a POC, and it works slightly different from our other annotations (as this needs access to the method invocation.

https://github.com/bdemers/shiro/blob/SHIRO-314-el/support/el/src/test/java/org/apache/shiro/el/AnnotatedStub.java

I added a [{{@ParamName}} | https://github.com/bdemers/shiro/blob/SHIRO-314-el/support/el/src/test/java/org/apache/shiro/el/AnnotatedStub.java#L33] annotation, but we may want to support the JAX-RS QueryParam, PathParm, and Spring equivalent as well.

I also named the annotation 'RequiresExpression' to match the other Shiro annotations, it might be a bit verbose though.

Thoughts / Ideas are welcome.

> Authorization ANTLR Grammar
> ---------------------------
>
>                 Key: SHIRO-314
>                 URL: https://issues.apache.org/jira/browse/SHIRO-314
>             Project: Shiro
>          Issue Type: New Feature
>          Components: Authorization (access control) 
>            Reporter: Maria Jurcovicova
>            Assignee: Les Hazlewood
>              Labels: patch, patch-with-test
>         Attachments: GrammarDemoProofOfConcept.rar, securedAnnotationAuthorizingExpressionLanguage.patch
>
>
> Create a single annotation that would translate the expression into the relevant hasRole/isPermitted calls. 
> Details are on wiki https://cwiki.apache.org/confluence/display/SHIRO/Version+2+Brainstorming#Version2Brainstorming-AuthorizationANTLRGrammar . 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)