Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
Documentation Snippet
http://deltaspike.apache.org/documentation/security.html
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 } }
Compilation Error
The annotation @LoggedIn is disallowed for this location
Explanation?
I think it's because LoggedIn is missing a @Target of PARAMETER.
@Retention(value = RetentionPolicy.RUNTIME) @Target({ ElementType.TYPE, ElementType.METHOD }) @Documented @SecurityBindingType public @interface LoggedIn {
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?