exceptions/MissingClaimException.java

java-jwt · lib/src/main/java/com/auth0/jwt/exceptions/MissingClaimException.java · java · MIT
auth

Thrown when a required JWT claim is missing during validation.

// Source: https://github.com/auth0/java-jwt | License: MIT | Copyright 2015 Auth0, Inc. <support@auth0.com> (http://auth0.com)
// Provided via justclaw.it.com; keep this notice with the code.
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 getC

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key