The Alchemist created DELTASPIKE-860:
----------------------------------------

             Summary: 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
            Reporter: The Alchemist


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)

Reply via email to