File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
modules/deltaspike/src/main/java/org/picketlink/authorization
tests/src/test/java/org/picketlink/test/authorization Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 24
24
import org .apache .deltaspike .security .api .authorization .Secures ;
25
25
import org .picketlink .Identity ;
26
26
import org .picketlink .authorization .annotations .GroupsAllowed ;
27
+ import org .picketlink .authorization .annotations .LoggedIn ;
27
28
import org .picketlink .authorization .annotations .PartitionsAllowed ;
28
- import org .picketlink .authorization .annotations .RequiresAccount ;
29
29
import org .picketlink .authorization .annotations .RequiresPermission ;
30
30
import org .picketlink .authorization .annotations .Restrict ;
31
31
import org .picketlink .authorization .annotations .RolesAllowed ;
@@ -70,13 +70,13 @@ public class DefaultAuthorizationManager {
70
70
private RelationshipManager relationshipManager ;
71
71
72
72
@ Secures
73
- @ RequiresAccount
73
+ @ LoggedIn
74
74
public boolean isLoggedIn (InvocationContext invocationContext ) {
75
- RequiresAccount requiresAccount = getAnnotation (invocationContext , RequiresAccount .class );
75
+ LoggedIn loggedIn = getAnnotation (invocationContext , LoggedIn .class );
76
76
Class <? extends Account > accountType = Account .class ;
77
77
78
- if (requiresAccount != null ) {
79
- accountType = requiresAccount . type ();
78
+ if (loggedIn != null ) {
79
+ accountType = loggedIn . requiresAccount ();
80
80
}
81
81
82
82
Account account = getIdentity ().getAccount ();
Original file line number Diff line number Diff line change 42
42
@ Target ({ ElementType .TYPE , ElementType .METHOD })
43
43
@ Documented
44
44
@ SecurityBindingType
45
- public @interface RequiresAccount {
45
+ public @interface LoggedIn {
46
46
47
47
/**
48
48
* <p>If defined, checks if the authenticated account is the same or a subclass of the given {@link org.picketlink.idm.model.Account} type.</p>
52
52
* @return
53
53
*/
54
54
@ Nonbinding
55
- Class <? extends Account > type () default Account .class ;
55
+ Class <? extends Account > requiresAccount () default Account .class ;
56
56
57
57
}
Original file line number Diff line number Diff line change 22
22
package org .picketlink .test .authorization ;
23
23
24
24
import org .picketlink .authorization .annotations .GroupsAllowed ;
25
+ import org .picketlink .authorization .annotations .LoggedIn ;
25
26
import org .picketlink .authorization .annotations .PartitionsAllowed ;
26
- import org .picketlink .authorization .annotations .RequiresAccount ;
27
27
import org .picketlink .authorization .annotations .RequiresPermission ;
28
28
import org .picketlink .authorization .annotations .RolesAllowed ;
29
29
import org .picketlink .idm .model .basic .Realm ;
34
34
*/
35
35
public class AnnotationProtectedBean {
36
36
37
- @ RequiresAccount
37
+ @ LoggedIn
38
38
public void protectedFromUnauthenticatedUsers (){
39
39
40
40
}
You can’t perform that action at this time.
0 commit comments