1 package com.atlassian.asap.core.parser;
2
3 import com.atlassian.asap.api.Jwt;
4 import com.atlassian.asap.api.exception.InvalidTokenException;
5
6 import java.security.PublicKey;
7
8 /**
9 * A signed JWT that can be verified using its signature and a public key.
10 */
11 public interface VerifiableJwt extends Jwt {
12 /**
13 * Verify the signature of the given Signed Jwt.
14 *
15 * @param publicKey the public key to use to verify the signature
16 * @throws InvalidTokenException if the signature is invalid or cannot be verified
17 */
18 void verifySignature(PublicKey publicKey) throws InvalidTokenException;
19 }