congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
DefaultSecurityTokenCodecTest$FakeContainerConfig.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.apache.shindig.auth.DefaultSecurityTokenCodecTest$FakeContainerConfig
constructor

Best Java code snippets using org.apache.shindig.auth.DefaultSecurityTokenCodecTest$FakeContainerConfig.<init> (Showing top 20 results out of 315)

origin: org.gatein.shindig/shindig-common

 @Test
 public void testRealDecoder() throws Exception {
  // Just verifies that "secure" tokens get routed to the right decoder class.
  try {
   new DefaultSecurityTokenCodec(new FakeContainerConfig("secure"));
   fail("Should have thrown");
  } catch (RuntimeException e) {
   assertTrue("root cause should have been FileNotFoundException: " + e,
     e.getMessage().contains("FileNotFoundException: container key file: somecontainer"));
  }
 }
}
origin: org.gatein.shindig/shindig-common

@Test
public void testInvalidDecoder() throws Exception {
 try {
  new DefaultSecurityTokenCodec(new FakeContainerConfig("garbage"));
  fail("Should have thrown");
 } catch (RuntimeException e) {
  assertTrue("exception should contain garbage: " + e, e.getMessage().contains("garbage"));
 }
}
origin: org.apache.shindig/shindig-common

@Test
public void testInvalidDecoder() throws Exception {
 try {
  new DefaultSecurityTokenCodec(new FakeContainerConfig("garbage"));
  fail("Should have thrown");
 } catch (RuntimeException e) {
  assertTrue("exception should contain garbage: " + e, e.getMessage().contains("garbage"));
 }
}
origin: org.apache.shindig/shindig-common

@Test
public void testBasicDecoder() throws Exception {
 DefaultSecurityTokenCodec codec = new DefaultSecurityTokenCodec(
   new FakeContainerConfig("insecure"));
 Long expires = System.currentTimeMillis() / 1000 + 500; // 50 seconds in the future
 String token = "o:v:app:domain:appurl:12345:container:" +  Long.toString(expires, 10);
 Map<String, String> parameters = Collections.singletonMap(
   SecurityTokenCodec.SECURITY_TOKEN_NAME, token);
 SecurityToken st = codec.createToken(parameters);
 assertEquals("o", st.getOwnerId());
 assertEquals("v", st.getViewerId());
 assertEquals("appurl", st.getAppUrl());
 assertEquals("container", st.getContainer());
 assertEquals(expires, st.getExpiresAt());
}
origin: apache/shindig

@Test
public void testBasicDecoder() throws Exception {
 DefaultSecurityTokenCodec codec = new DefaultSecurityTokenCodec(
   new FakeContainerConfig("insecure"));
 Long expires = System.currentTimeMillis() / 1000 + 500; // 50 seconds in the future
 String token = "o:v:app:domain:appurl:12345:container:" +  Long.toString(expires, 10);
 Map<String, String> parameters = Collections.singletonMap(
   SecurityTokenCodec.SECURITY_TOKEN_NAME, token);
 SecurityToken st = codec.createToken(parameters);
 assertEquals("o", st.getOwnerId());
 assertEquals("v", st.getViewerId());
 assertEquals("appurl", st.getAppUrl());
 assertEquals("container", st.getContainer());
 assertEquals(expires, st.getExpiresAt());
}
origin: org.wso2.org.apache.shindig/shindig-common

@Test
public void testBasicDecoder() throws Exception {
 DefaultSecurityTokenCodec codec = new DefaultSecurityTokenCodec(
   new FakeContainerConfig("insecure"));
 Long expires = System.currentTimeMillis() / 1000 + 500; // 50 seconds in the future
 String token = "o:v:app:domain:appurl:12345:container:" +  Long.toString(expires, 10);
 Map<String, String> parameters = Collections.singletonMap(
   SecurityTokenCodec.SECURITY_TOKEN_NAME, token);
 SecurityToken st = codec.createToken(parameters);
 assertEquals("o", st.getOwnerId());
 assertEquals("v", st.getViewerId());
 assertEquals("appurl", st.getAppUrl());
 assertEquals("container", st.getContainer());
 assertEquals(expires, st.getExpiresAt());
}
origin: org.gatein.shindig/shindig-common

@Test
public void testBasicDecoder() throws Exception {
 DefaultSecurityTokenCodec codec = new DefaultSecurityTokenCodec(
   new FakeContainerConfig("insecure"));
 String token = "o:v:app:domain:appurl:12345:container";
 Map<String, String> parameters = Collections.singletonMap(
   SecurityTokenCodec.SECURITY_TOKEN_NAME, token);
 SecurityToken st = codec.createToken(parameters);
 assertEquals("o", st.getOwnerId());
 assertEquals("v", st.getViewerId());
 assertEquals("appurl", st.getAppUrl());
 assertEquals("container", st.getContainer());
}
origin: com.lmco.shindig/shindig-common

@Test
public void testBasicDecoder() throws Exception {
 DefaultSecurityTokenCodec codec = new DefaultSecurityTokenCodec(
   new FakeContainerConfig("insecure"));
 String token = "o:v:app:domain:appurl:12345:container";
 Map<String, String> parameters = Collections.singletonMap(
   SecurityTokenCodec.SECURITY_TOKEN_NAME, token);
 SecurityToken st = codec.createToken(parameters);
 assertEquals("o", st.getOwnerId());
 assertEquals("v", st.getViewerId());
 assertEquals("appurl", st.getAppUrl());
 assertEquals("container", st.getContainer());
}
origin: apache/shindig

 @Test
 public void testRealDecoder() throws Exception {
  // Just verifies that "secure" tokens get routed to the right decoder class.
  DefaultSecurityTokenCodec securityTokenCodec = new DefaultSecurityTokenCodec(new FakeContainerConfig("secure"));
  assertTrue(securityTokenCodec.getCodec() instanceof BlobCrypterSecurityTokenCodec);
 }
}
origin: apache/shindig

@Test
public void testInvalidDecoder() throws Exception {
 try {
  new DefaultSecurityTokenCodec(new FakeContainerConfig("garbage"));
  fail("Should have thrown");
 } catch (RuntimeException e) {
  assertTrue("exception should contain garbage: " + e, e.getMessage().contains("garbage"));
 }
}
origin: com.lmco.shindig/shindig-common

@Test
public void testInvalidDecoder() throws Exception {
 try {
  new DefaultSecurityTokenCodec(new FakeContainerConfig("garbage"));
  fail("Should have thrown");
 } catch (RuntimeException e) {
  assertTrue("exception should contain garbage: " + e, e.getMessage().contains("garbage"));
 }
}
origin: org.gatein.shindig/shindig-common

@Test
public void testNullDecoder() throws Exception {
 try {
  new DefaultSecurityTokenCodec(new FakeContainerConfig(null));
  fail("Should have thrown");
 } catch (RuntimeException e) {
  assertTrue("exception should contain null: " + e, e.getMessage().contains("null"));
 }
}
origin: org.apache.shindig/shindig-common

 @Test
 public void testRealDecoder() throws Exception {
  // Just verifies that "secure" tokens get routed to the right decoder class.
  DefaultSecurityTokenCodec securityTokenCodec = new DefaultSecurityTokenCodec(new FakeContainerConfig("secure"));
  assertTrue(securityTokenCodec.getCodec() instanceof BlobCrypterSecurityTokenCodec);
 }
}
origin: com.lmco.shindig/shindig-common

 @Test
 public void testRealDecoder() throws Exception {
  // Just verifies that "secure" tokens get routed to the right decoder class.
  try {
   new DefaultSecurityTokenCodec(new FakeContainerConfig("secure"));
   fail("Should have thrown");
  } catch (RuntimeException e) {
   assertTrue("root cause should have been FileNotFoundException: " + e,
     e.getMessage().contains("FileNotFoundException: container key file: somecontainer"));
  }
 }
}
origin: com.lmco.shindig/shindig-common

@Test
public void testNullDecoder() throws Exception {
 try {
  new DefaultSecurityTokenCodec(new FakeContainerConfig(null));
  fail("Should have thrown");
 } catch (RuntimeException e) {
  assertTrue("exception should contain null: " + e, e.getMessage().contains("null"));
 }
}
origin: org.wso2.org.apache.shindig/shindig-common

 @Test
 public void testRealDecoder() throws Exception {
  // Just verifies that "secure" tokens get routed to the right decoder class.
  DefaultSecurityTokenCodec securityTokenCodec = new DefaultSecurityTokenCodec(new FakeContainerConfig("secure"));
  assertTrue(securityTokenCodec.getCodec() instanceof BlobCrypterSecurityTokenCodec);
 }
}
origin: org.apache.shindig/shindig-common

@Test
public void testNullDecoder() throws Exception {
 try {
  new DefaultSecurityTokenCodec(new FakeContainerConfig(null));
  fail("Should have thrown");
 } catch (RuntimeException e) {
  assertTrue("exception should contain null: " + e, e.getMessage().contains("null"));
 }
}
origin: apache/shindig

@Test
public void testNullDecoder() throws Exception {
 try {
  new DefaultSecurityTokenCodec(new FakeContainerConfig(null));
  fail("Should have thrown");
 } catch (RuntimeException e) {
  assertTrue("exception should contain null: " + e, e.getMessage().contains("null"));
 }
}
origin: org.wso2.org.apache.shindig/shindig-common

@Test
public void testNullDecoder() throws Exception {
 try {
  new DefaultSecurityTokenCodec(new FakeContainerConfig(null));
  fail("Should have thrown");
 } catch (RuntimeException e) {
  assertTrue("exception should contain null: " + e, e.getMessage().contains("null"));
 }
}
origin: org.wso2.org.apache.shindig/shindig-common

@Test
public void testInvalidDecoder() throws Exception {
 try {
  new DefaultSecurityTokenCodec(new FakeContainerConfig("garbage"));
  fail("Should have thrown");
 } catch (RuntimeException e) {
  assertTrue("exception should contain garbage: " + e, e.getMessage().contains("garbage"));
 }
}
org.apache.shindig.authDefaultSecurityTokenCodecTest$FakeContainerConfig<init>

Popular methods of DefaultSecurityTokenCodecTest$FakeContainerConfig

    Popular in Java

    • Reactive rest calls using spring rest template
    • findViewById (Activity)
    • getSupportFragmentManager (FragmentActivity)
    • startActivity (Activity)
    • EOFException (java.io)
      Thrown when a program encounters the end of a file or stream during an input operation.
    • SocketException (java.net)
      This SocketException may be thrown during socket creation or setting options, and is the superclass
    • KeyStore (java.security)
      KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
    • DateFormat (java.text)
      Formats or parses dates and times.This class provides factories for obtaining instances configured f
    • XPath (javax.xml.xpath)
      XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
    • IsNull (org.hamcrest.core)
      Is the value null?
    • Top Vim plugins
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Tabnine for your IDE now