feat: Add token validation
Description
This MR adds verification that token has required scopes when we're adding it to VSCode
Related Issues
Resolves #1042 (closed)
How has this been tested?
- Create new token missing either
api
orread_user
permission - Run VSCode extension, use
GitLab: Add Account to VSCode
command - paste token with insufficient permissions
- observe error
Screenshots (if appropriate):
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to change) -
Documentation -
Chore (Related to CI or Packaging to platforms) -
Test gap
Related to #1042 (closed)
Edited by Illya Klymov