com.auth0.jwt.exceptions.MissingClaimException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-jwt Show documentation
Show all versions of java-jwt Show documentation
Java implementation of JSON Web Token (JWT)
package com.auth0.jwt.exceptions;
/**
* This exception is thrown when the claim to be verified is missing.
*/
public class MissingClaimException extends InvalidClaimException {
private final String claimName;
public MissingClaimException(String claimName) {
super(String.format("The Claim '%s' is not present in the JWT.", claimName));
this.claimName = claimName;
}
/**
* This method can be used to fetch the name for which the Claim is missing during the verification.
*
* @return The name of the Claim that doesn't exist.
*/
public String getClaimName() {
return claimName;
}
}