Package org.apache.shindig.auth

Examples of org.apache.shindig.auth.SecurityTokenCodec


  private OSEAuthConfigContributor contrib, exceptionContrib;

  @Before
  public void setup() throws Exception {
    SecurityTokenCodec codec = createNiceMock(SecurityTokenCodec.class);
    expect(codec.encodeToken(anyObject(SecurityToken.class))).andReturn("IAmASecurityToken")
            .anyTimes();
    replay(codec);
    this.contrib = new OSEAuthConfigContributor(codec);

    SecurityTokenCodec exceptionCodec = createNiceMock(SecurityTokenCodec.class);
    expect(exceptionCodec.encodeToken(anyObject(SecurityToken.class))).andThrow(
            new SecurityTokenException("Catch me!")).anyTimes();
    replay(exceptionCodec);
    this.exceptionContrib = new OSEAuthConfigContributor(exceptionCodec);
  }
View Full Code Here

TOP

Related Classes of org.apache.shindig.auth.SecurityTokenCodec

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.