public function validateOrFail($secret = null, $algo = null)
    {
        if( ! $this->validate($secret, $algo)) {
            throw new InvalidTokenException('Token is not valid.');
        }

        return true;
    }
public function validateOrFail($secret = null, $algo = null)
    {
        if( ! $this->validate($secret, $algo)) {
            throw new InvalidTokenException('Token is not valid.');
        }

        return true;
    }
public function validateOrFail ( $ secret = null , $ algo = null ) { if ( ! $ this -> validate ( $ secret , $ algo ) ) { throw new InvalidTokenException ( 'Token is not valid.' ) ; } return true ; }
Validate the token or throw an exception

@param string|null $secret
@param string|null $algo

@return bool

@throws InvalidTokenException
Validate the token or throw an exception