Repository: deltaspike
Updated Branches:
  refs/heads/master 5af230eb2 -> 4edbca0ca


replaced "@LoggedIn User" with "Identity identity"

@LoggedIn is not a real annotation, so the code examples can't be copy/pasted 
and used.
It appears it can be this can be replaced with  injecting an Identity type 
instead.

DELTASPIKE-860


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/4edbca0c
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/4edbca0c
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/4edbca0c

Branch: refs/heads/master
Commit: 4edbca0cabfb017460262a0ccd529597aa98a017
Parents: 5af230e
Author: The Alchemist <[email protected]>
Authored: Sat Mar 21 11:06:22 2015 -0400
Committer: Rafael Benevides <[email protected]>
Committed: Mon Mar 23 10:21:07 2015 -0400

----------------------------------------------------------------------
 documentation/src/main/asciidoc/security.adoc | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/4edbca0c/documentation/src/main/asciidoc/security.adoc
----------------------------------------------------------------------
diff --git a/documentation/src/main/asciidoc/security.adoc 
b/documentation/src/main/asciidoc/security.adoc
index 7340310..794352c 100644
--- a/documentation/src/main/asciidoc/security.adoc
+++ b/documentation/src/main/asciidoc/security.adoc
@@ -83,9 +83,9 @@ public class CustomAuthorizer
 {
     @Secures
     @CustomSecurityBinding
-    public boolean doSecuredCheck(InvocationContext invocationContext, 
BeanManager manager, @LoggedIn User user) throws Exception
+    public boolean doSecuredCheck(InvocationContext invocationContext, 
BeanManager manager, Identity identity) throws Exception
     {
-        return user.isLoggedIn(); // perform security check
+        return identity.isLoggedIn(); // perform security check
     }
 }
 
---------------------------------------------------------------------------------------------------------------------------------
@@ -135,9 +135,9 @@ public class CustomAuthorizer
 {
     @Secures
     @CustomSecurityBinding
-    public boolean doSecuredCheck(InvocationContext invocationContext, 
BeanManager manager, @LoggedIn User user, @CurrentThing Thing thing) throws 
Exception
+    public boolean doSecuredCheck(InvocationContext invocationContext, 
BeanManager manager, Identity identity, @CurrentThing Thing thing) throws 
Exception
     {
-        return thing.hasMember(user); // perform security check against our 
method parameter
+        return thing.hasMember(identity); // perform security check against 
our method parameter
     }
 }
 
------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -190,9 +190,9 @@ public class CustomAuthorizer
 {
     @Secures
     @CustomSecurityBinding
-    public boolean doSecuredCheck(@SecuredReturn Thing thing, @LoggedIn User 
user) throws Exception
+    public boolean doSecuredCheck(@SecuredReturn Thing thing, Identity 
identity) throws Exception
     {
-        return thing.hasMember(user); // perform security check against the 
return value
+        return thing.hasMember(identity); // perform security check against 
the return value
 }
 
---------------------------------------------------------------------------------------------------
 

Reply via email to