middleware to validate github token