Examples of JOSEObjectType


Examples of com.nimbusds.jose.JOSEObjectType

    throws Exception {

    JWSHeader header = JWSHeader.parse(b64header);

    assertEquals("HS256 alg check", JWSAlgorithm.HS256, header.getAlgorithm());
    assertEquals("JWT type check", new JOSEObjectType("JWT"), header.getType());

    JWSObject jwsObject = new JWSObject(header, payload);

    assertEquals("State check", JWSObject.State.UNSIGNED, jwsObject.getState());
View Full Code Here

Examples of com.nimbusds.jose.JOSEObjectType

    PlainJWT plainJWT = PlainJWT.parse(jwtString);

    // Header
    assertEquals(Algorithm.NONE, plainJWT.getHeader().getAlgorithm());
    assertEquals(new JOSEObjectType("JWT"), plainJWT.getHeader().getType());

    // Claims
    assertEquals(new Date(377486405l * 1000), plainJWT.getJWTClaimsSet().getExpirationTime());
    assertEquals("DP01gy3QkwVGGdIejIJgLXCtRTga", plainJWT.getJWTClaimsSet().getClaim("azp"));
    assertEquals("admin@carbon.super", plainJWT.getJWTClaimsSet().getSubject());
View Full Code Here

Examples of com.nimbusds.jose.JOSEObjectType

    throws Exception {

    JWSHeader header = JWSHeader.parse(b64header);

    assertEquals("HS256 alg check", JWSAlgorithm.HS256, header.getAlgorithm());
    assertEquals("JWT type check", new JOSEObjectType("JWT"), header.getType());

    JWSObject jwsObject = new JWSObject(header, payload);

    assertEquals("State check", JWSObject.State.UNSIGNED, jwsObject.getState());
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.