Fixed claim check in JwtValidator
* Removed the addRequiredClaimWithValue() method, as checking the value should be up to the implementation.
This commit is contained in:
		@@ -21,12 +21,10 @@ class JwtValidator
 | 
			
		||||
 | 
			
		||||
    public function addRequiredClaim(string $name)
 | 
			
		||||
    {
 | 
			
		||||
        $this->requireClaims[$name] = true;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function addRequiredClaimWithValue(string $name, $value)
 | 
			
		||||
    {
 | 
			
		||||
        $this->requireClaims[$name] = [ $value ];
 | 
			
		||||
        if (!in_array($name, $this->requireClaims)) {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        $this->requireClaims[] = $name;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function validateToken(JwtToken $token)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user