Exemplo n.º 1
0
 @Test
 public void testBuildAuthnRequestObject() throws Exception {
   String consumerUrl = "http://someurl.com";
   String idpUrl = "http://idp.domain.example";
   String spId = "cloudstack";
   String authnId = SAMLUtils.generateSecureRandomId();
   AuthnRequest req = SAMLUtils.buildAuthnRequestObject(authnId, spId, idpUrl, consumerUrl);
   assertEquals(req.getAssertionConsumerServiceURL(), consumerUrl);
   assertEquals(req.getDestination(), idpUrl);
   assertEquals(req.getIssuer().getValue(), spId);
 }
Exemplo n.º 2
0
 @Test
 public void testGenerateSecureRandomId() throws Exception {
   assertTrue(SAMLUtils.generateSecureRandomId().length() > 0);
 }