Examples of TestPrincipal


Examples of org.jboss.soa.esb.services.security.TestPrincipal

        message.getContext().setContext(SecurityService.AUTH_REQUEST, encryptedAuthRequest);

        final boolean processingResult = pipeline.process(message);

        assertTrue(processingResult);
        assertEquals(new TestPrincipal("test").getName(), MockSecuredActionProcessor.getSubject().getPrincipals().iterator().next().getName());
        assertEquals("The encrypted AuthenticationRequest should have been set as a thread local",
                encryptedAuthRequest, AuthenticationRequestImpl.getEncryptedAuthRequest());
        assertTrue("The SecurityContext should have been pushed", MockSecurityContextPropagator.wasPushCalled());
        assertTrue("The SerirityContext should have been popped", MockSecurityContextPropagator.wasPopCalled());
        assertNull("AuthenticationRequest should have been removed from the message context",
View Full Code Here

Examples of org.jboss.soa.esb.services.security.TestPrincipal

public class AuthenticationRequestUnitTest
{
  @Test
  public void contruct()
  {
    final Principal principal = new TestPrincipal("testUser");
    AuthenticationRequest request = new AuthenticationRequestImpl.Builder(principal, null ).build();
    assertEquals( principal, request.getPrincipal());
  }
View Full Code Here

Examples of org.springframework.messaging.simp.TestPrincipal

    this.channel = Mockito.mock(MessageChannel.class);
    this.messageCaptor = ArgumentCaptor.forClass(Message.class);

    this.session = new TestWebSocketSession();
    this.session.setId("s1");
    this.session.setPrincipal(new TestPrincipal("joe"));
  }
View Full Code Here

Examples of org.springframework.web.socket.handler.TestPrincipal

  }


  @Test
  public void getPrincipalWithConstructorArg() {
    TestPrincipal user = new TestPrincipal("joe");
    JettyWebSocketSession session = new JettyWebSocketSession(attributes, user);

    assertSame(user, session.getPrincipal());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.