Class ConstraintValidator

    • Constructor Detail

      • ConstraintValidator

        public ConstraintValidator()
    • Method Detail

      • validate

        public void validate​(VerifiedClaimsContainerConstraint container)
                      throws ConstraintException
        Validate a constraint that represents an object which includes verified_claims.
        Parameters:
        container - A constraint which includes verified_claims.
        Throws:
        ConstraintException - The given constraint violates one or more requirements in the specification.
      • validate

        public void validate​(VerifiedClaimsConstraint verifiedClaims)
                      throws ConstraintException
        Validate a constraint that represents verified_claims.
        Parameters:
        verifiedClaims - A constraint which represents verified_claims.
        Throws:
        ConstraintException - The given constraint violates one or more requirements in the specification.
      • validate

        public void validate​(ClaimsConstraint claims)
                      throws ConstraintException
        Validate a constraint that represents verified_claims/claims.
        Parameters:
        claims - A constraint which represents verified_claims/claims.
        Throws:
        ConstraintException - The given constraint violates one or more requirements in the specification.
      • validate

        public void validate​(String key,
                             VerifiedClaimConstraint verifiedClaim)
                      throws ConstraintException
        Validate a constraint that represents a claim in verified_claims/claims.
        Parameters:
        verifiedClaims - A constraint which represents a claim in verified_claims/claims.
        Throws:
        ConstraintException - The given constraint violates one or more requirements in the specification.
      • validatePurpose

        public void validatePurpose​(String key,
                                    String purpose)
                             throws ConstraintException
        Validate purpose of a claim in verified_claims/claims.
        Parameters:
        key - The name of a claim.
        purpose - The purpose of the claim.
        Throws:
        ConstraintException - The length of the purpose is shorter than 3 or longer than 300. When purpose is null, no exception is thrown.