Skip to content
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

Test: Authentication provider registration API #117299

Closed
3 tasks done
RMacfarlane opened this issue Feb 23, 2021 · 1 comment
Closed
3 tasks done

Test: Authentication provider registration API #117299

RMacfarlane opened this issue Feb 23, 2021 · 1 comment

Comments

@RMacfarlane
Copy link
Contributor

RMacfarlane commented Feb 23, 2021

Refs: #88309

Create Issue


The milestone the registerAuthenticationProvider API and associated interfaces have been finalized.

Please read through the docs in vscode.d.ts and verify the descriptions make sense. Then, try to implement and register an AuthenticationProvider. If you're feeling extremely ambitious you could try to actually perform auth against a service, perhaps looking at the GitHub auth provider as an example. You could also simply create fake session data. The API should allow:

  • other extensions to use the provider to get sessions using vscode.authentication.getSession
  • other extensions to be able to create a new session with getSessions and the createIfNone flag
  • account information to be listed under the accounts menu for sessions returned by the extension
@rebornix
Copy link
Member

I successfully built an authentication provider for home assistant, it took me a while to understand how the API should be used but at the end it works pretty. Good work 🎉 .

While building the authentication provider (even after building one successfully), I'm confused how and when to specify which home assistant instance should users authenticate against. It seems the only solution is the authentication provider provide a quick pick to users to let them to choose the endpoint to use, and also embed the endpoint/instance info in AuthenticationSession.id and AuthenticationSessionAccountInformation.label , there isn't any other place for me to store the endpoint in the authentication session and share with third parties. It seems the work is left to extension authors. With this being said, the rest of the API are straightforward.

@rebornix rebornix removed their assignment Feb 24, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Apr 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants