[
https://issues.apache.org/jira/browse/DELTASPIKE-860?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rafael Benevides resolved DELTASPIKE-860.
-----------------------------------------
Resolution: Fixed
PR merged
> documentation says "@LoggedIn User user", but that's impossible
> ---------------------------------------------------------------
>
> Key: DELTASPIKE-860
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-860
> Project: DeltaSpike
> Issue Type: Bug
> Components: Documentation
> Reporter: The Alchemist
> Assignee: Rafael Benevides
> Priority: Minor
>
> h3. Documentation Snippet
> http://deltaspike.apache.org/documentation/security.html
> {noformat}
> Create the Authorizer
> @ApplicationScoped
> public class CustomAuthorizer
> {
> @Secures
> @CustomSecurityBinding
> public boolean doSecuredCheck(InvocationContext invocationContext,
> BeanManager manager, @LoggedIn User user) throws Exception
> {
> return user.isLoggedIn(); // perform security check
> }
> }
> {noformat}
> h3. Compilation Error
> {noformat}
> The annotation @LoggedIn is disallowed for this location
> {noformat}
> h3. Explanation?
> I think it's because {{LoggedIn}} is missing a {{@Target}} of {{PARAMETER}}.
> {code:java,title=LoggedIn.java}
> @Retention(value = RetentionPolicy.RUNTIME)
> @Target({ ElementType.TYPE, ElementType.METHOD })
> @Documented
> @SecurityBindingType
> public @interface LoggedIn {
> {code}
> h3. Conclusion
> Not sure if this is supposed to work, given that {{LoggedIn}} is part of
> PicketLink, not DeltaSpike.
> Is there a workaround for this type of situation?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)