Skip to content

Commit b77bea8

Browse files
authored
Update README.md
1 parent 213fca9 commit b77bea8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,10 @@ $signer = new HS256('12345678901234567890123456789012');
173173
// Extend the DefaultValidator
174174
$validator = new DefaultValidator();
175175

176-
// The presence of the 'is-admin' claim is mandatory for successful validation. If absent, the validation will fail.
177-
// Additionally, if the rule does not match the corresponding value, the validation will also fail.
176+
// The 'is-admin' claim is required, without it or a mismatched rule, validation fails.
178177
$validator->addRequiredRule('is-admin', new EqualsTo(true));
179178

180-
// The 'exp' claim is optional, and the rule will be applicable only if it is present.
179+
// The 'exp' claim is optional, and the rule will be applicable if it is present.
181180
$validator->addOptionalRule('exp', new NewerThan(time()), false);
182181

183182
// Parse the token

0 commit comments

Comments
 (0)