Class TokenClaim


  • public final class TokenClaim
    extends Object
    Properties for expected token claims.
    • Constructor Detail

      • TokenClaim

        public TokenClaim()
    • Method Detail

      • name

        public String name()
        Get the name property: Name of the claim which must be present on the token.
        Returns:
        the name value.
      • withName

        public TokenClaim withName​(String name)
        Set the name property: Name of the claim which must be present on the token.
        Parameters:
        name - the name value to set.
        Returns:
        the TokenClaim object itself.
      • value

        public String value()
        Get the value property: Expected value of the claim to be present on the token.
        Returns:
        the value value.
      • withValue

        public TokenClaim withValue​(String value)
        Set the value property: Expected value of the claim to be present on the token.
        Parameters:
        value - the value value to set.
        Returns:
        the TokenClaim object itself.
      • validate

        public void validate()
        Validates the instance.
        Throws:
        IllegalArgumentException - thrown if the instance is not valid.