File tree 1 file changed +3
-10
lines changed
src/AuthorizationValidators
1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -74,20 +74,13 @@ private function initJwtConfiguration(): void
74
74
throw new RuntimeException ('Public key is empty ' );
75
75
}
76
76
77
- $ validationConstraints = [
77
+ $ this -> jwtConfiguration -> setValidationConstraints (
78
78
new LooseValidAt ($ clock , $ this ->jwtValidAtDateLeeway ),
79
79
new SignedWith (
80
80
new Sha256 (),
81
81
InMemory::plainText ($ publicKeyContents , $ this ->publicKey ->getPassPhrase () ?? '' )
82
- ),
83
- ];
84
-
85
- // TODO: next major release: bump lcobucci/jwt to ^5.5 and remove the following check
86
- if (method_exists ($ this ->jwtConfiguration , 'withValidationConstraints ' ) === true ) {
87
- $ this ->jwtConfiguration = $ this ->jwtConfiguration ->withValidationConstraints (...$ validationConstraints );
88
- } else {
89
- $ this ->jwtConfiguration ->setValidationConstraints (...$ validationConstraints );
90
- }
82
+ )
83
+ );
91
84
}
92
85
93
86
/**
You can’t perform that action at this time.
0 commit comments