Package org.jboss.soa.esb.services.security.principals

Examples of org.jboss.soa.esb.services.security.principals.Group


  public void authenticateWithExistingRole() throws ConfigurationException, SecurityServiceException
  {
    Builder builder = new SecurityConfig.Builder("SuccessfulLogin");
    builder.runAs("adminRole");
    SecurityConfig configInfo = builder.build();
    Group group = new Group("Roles");
    group.addMember(new Role("adminRole1"));

    subject.getPrincipals().add(group);

    SecurityContext context = new SecurityContext(subject, SecurityContext.getConfigurationTimeout());
    service.authenticate(configInfo, context, null);
View Full Code Here


        {
            final Role role = new Role(roleName);
            final Set<Group> principals = subject.getPrincipals(Group.class);
            if ( principals.isEmpty() )
            {
                final Group group = new Group("Roles");
                group.addMember(role);
                subject.getPrincipals().add(group);
            }
            else
            {
                for (Group groups : principals)
View Full Code Here

    @Test
  public void isCallerInRole()
  {
    Subject subject = new Subject();
    subject.getPrincipals().add( new User("AustinPowerwich") );
    Group roles = new Group("Roles");
    roles.addMember( new Role("Admin"));
    subject.getPrincipals().add(roles);

    SecurityContext securityContext = new SecurityContext(subject, 30000);
    boolean callerInRole = securityContext.isCallerInRole("Admin");
    assertTrue( callerInRole );
View Full Code Here

    {
      final Role runAsRole = new Role(runAs);
      final Set<Group> principals = subject.getPrincipals(Group.class);
      if ( principals.isEmpty() )
      {
            final Group group = new Group("Roles");
          group.addMember(runAsRole);
          subject.getPrincipals().add(group);
      }
      else
      {
        for (Group groups : principals)
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.services.security.principals.Group

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.