Introduce public API to retrieve an API key for organizations, given an authenticated user
Nobody has claimed this yet.
- Dominant language
- Elixir
- Stars
- 1.1k
- Forks
- 211
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 7
Description
Use case
We're working on support for private packages with igniter (not external repos, that will come later), and part of the workflow includes looking up package information using the API. The user might issue this command:
mix igniter.install my_org/package
We would then want to read the package information via the API, and find out what the latest, non-revoked, non-release-candidate version is (or just latest non-revoked if nothing meets that criteria), and provide a "good" pin for it, i.e "~> 3.5" in the users mix.exs.
Current Work
Our first attempt was to use Mix.State.fetch!(:repos), but after discussion with @ericmj it became clear that the auth_key we get from that is not correct/sufficient for reading packages via the API. This code is in main of igniter presently. It works, in fact, for explicitly provided versions like mix igniter.install org/package@3.5, so all that is left for us to solve is:
- have them run
mix local.hexto update and get this new API. - get an api key for looking this info up (or tell the user to run
mix hex.user authand confirm they have access to the org
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the current Mix.State.fetch!(:repos) and auth_key handling described in the issue, then review how mix local.hex and mix hex.user auth establish access. Define the public API and authentication behavior needed for an authenticated user to retrieve an organization key, and verify that it supports private package lookups and the stated access checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir
- Domain
- api, authentication, authorization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100