fix(authn-jwt): avoid to save empty claim name

An empty claim_name has not a real meaning and will result in a
syntax error cluster_override.conf. i.e:
```
authentication {
  mechanism = "jwt"
  verify_claims { = "22"}
  ...
}
```
This commit is contained in:
JianBo He 2022-04-27 17:27:27 +08:00
parent ca846d0c53
commit 6535eb879c
1 changed files with 5 additions and 0 deletions

View File

@ -441,6 +441,11 @@ check_claim_name(iat) ->
false;
check_claim_name(nbf) ->
false;
check_claim_name(Name) when
Name == <<>>;
Name == ""
->
false;
check_claim_name(_) ->
true.