amarkevich commented on issue #592: [CXF-8140]:setAccessible(true) before 
reflection method java.security…
URL: https://github.com/apache/cxf/pull/592#issuecomment-547868209
 
 
   Test passed even with existing impl:
   ```
       @Test
       public void testCheckGroup() {
           final String role = "role";
           Subject s = new Subject();
           Principal p = new SimplePrincipal(role);
           TestGroupPrincipal g = new TestGroupPrincipal("groupName", p);
           s.getPrincipals().add(g);
           LoginSecurityContext context = new DefaultSecurityContext(g, s);
           assertTrue(context.isUserInRole(role));
       }
   
       @SuppressWarnings("serial")
       private class TestGroupPrincipal extends SimpleGroup {
           TestGroupPrincipal(String groupName, Principal member) {
               super(groupName, member);
           }
           @Override
           public Enumeration<? extends Principal> members() {
               return super.members();
           }
       }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to