java_src/src/main/java/com/google/crypto/tink/jwt/JwtValidator.java
/**
     * Sets the expected subject claim of the token. When this is set, all tokens with missing or
     * different {@code sub} claims are rejected. When this is not set, all token that have a {@code
     * sub} claim are rejected. So this must be set for token that have a {@code sub} claim.
     *
     * <p>If you want to ignore this claim or if you want to validate it yourself, use
     * ignoreSubject().
     *
     * <p>https://tools.ietf.org/html/rfc7519#section-4.1.2
     */
Sets the expected subject claim of the token. When this is set, all tokens with missing or
different  sub claims are rejected. When this is not set, all token that have a {@code
sub} claim are rejected. So this must be set for token that have a  sub claim.

If you want to ignore this claim or if you want to validate it yourself, use
ignoreSubject().


Sets the expected subject claim of the token . When this is set all tokens with missing or different sub claims are rejected . When this is not set all token that have a { @code sub } claim are rejected . So this must be set for token that have a sub claim . If you want to ignore this claim or if you want to validate it yourself use ignoreSubject () .
public Builder expectSubject(String value) {
      if (value == null) {
        throw new NullPointerException("subject cannot be null");
      }
      this.expectedSubject = Optional.of(value);
      return this;
    }
public Builder expectSubject ( String value ) { if ( value == null ) { throw new NullPointerException ( "subject cannot be null" ) ; } this . expectedSubject = Optional . of ( value ) ; return this ; }
Sets the expected subject claim of the token.
Sets the expected subject claim of the token .