Skip to content

feat: added pat to preferences page #297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

feat: added pat to preferences page #297

wants to merge 10 commits into from

Conversation

acke
Copy link
Contributor

@acke acke commented May 20, 2025

Description

This ticket covers enhancing the IDE plugins' settings pages to allow a user to authenticate with PATs. As a minimum, this means:

  • They can select PAT as an authentication mechanism (Snyk Language Server does not support this option yet!)
  • added a dropdown on IDE
  • The “Connect IDE to Snyk“ (Get Authentication Token) button opens the PAT generation page (e.g https://app.snyk.io/account/personal-access-tokens) when PAT is the auth method
  • The Token field allows pasting PATs
  • TBD - Token auth is renamed to API Token
  • Config is updated with the Auth method and PAT when supplied.
  • Auth flow is kicked off when Apply is clicked in settings.

Checklist

  • Tests added and all succeed
  • Linted
  • CHANGELOG.md updated
  • README.md updated, if user-facing

Screenshots / GIFs

Visuals that may help the reviewer. Please add screenshots for any UI change. GIFs are most welcome!

@acke acke force-pushed the feat/IDE-1188_add-pat branch 2 times, most recently from c640b19 to e051972 Compare May 21, 2025 11:32
@acke acke marked this pull request as ready for review May 21, 2025 14:24
@acke acke requested a review from a team as a code owner May 21, 2025 14:24
@acke acke force-pushed the feat/IDE-1188_add-pat branch from eba8c3a to 1e1c277 Compare May 23, 2025 07:14
@acke acke force-pushed the feat/IDE-1188_add-pat branch from 82b0ba8 to 3969e3a Compare May 23, 2025 09:54
@acke acke force-pushed the feat/IDE-1188_add-pat branch from 3969e3a to 818de2c Compare May 23, 2025 10:15
import io.snyk.eclipse.plugin.utils.SnykLogger;
import io.snyk.languageserver.SnykLanguageServer;
import io.snyk.languageserver.protocolextension.SnykExtendedLanguageClient;

public class PreferencesPage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
private static final String TRUSTING_WORKSPACE_FOLDERS = "Trusting workspace folders...";

Check warning

Code scanning / PMD

Avoid unused private fields such as 'TRUSTING_WORKSPACE_FOLDERS'.

Avoid unused private fields such as 'TRUSTING_WORKSPACE_FOLDERS'.
@bastiandoetsch bastiandoetsch force-pushed the feat/IDE-1188_add-pat branch from 063b114 to 170f896 Compare May 28, 2025 13:31
@bastiandoetsch bastiandoetsch force-pushed the feat/IDE-1188_add-pat branch from 170f896 to 1e02e00 Compare May 28, 2025 13:43
@andrewrobinsonhodges-snyk
Copy link
Contributor

TODO - need to bump LS protocol version (once LS changes are in) to handle sending "pat" as an auth type.

@bastiandoetsch
Copy link
Contributor

TODO - need to bump LS protocol version (once LS changes are in) to handle sending "pat" as an auth type.

It already has Protocol version 20 - so that should be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants