Package com.nimbusds.jose

Examples of com.nimbusds.jose.JWSHeader



  public void testVerifyWithReadyVector()
    throws Exception {

    JWSHeader header = JWSHeader.parse(b64header);

    JWSVerifier verifier = new MACVerifier(sharedSecret);

    boolean verified = verifier.verify(header, signable, b64sig);
View Full Code Here


  public void testCritHeaderParamIgnore()
    throws Exception {

    final String stringSecret = "3eae8196ad1b";

    JWSHeader header = new JWSHeader(JWSAlgorithm.HS512);
    header.setCustomParameter("exp", "2014-04-24");
    header.setCriticalHeaders(new HashSet<String>(Arrays.asList("exp")));

    JWSObject jwsObject = new JWSObject(header, payload);

    MACSigner signer = new MACSigner(stringSecret);
View Full Code Here

  public void testCritHeaderParamReject()
    throws Exception {

    final String stringSecret = "3eae8196ad1b";

    JWSHeader header = new JWSHeader(JWSAlgorithm.HS512);
    header.setCustomParameter("exp", "2014-04-24");
    header.setCriticalHeaders(new HashSet<String>(Arrays.asList("exp")));

    JWSObject jwsObject = new JWSObject(header, payload);

    MACSigner signer = new MACSigner(stringSecret);
View Full Code Here

TOP

Related Classes of com.nimbusds.jose.JWSHeader

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.