{"id":18837937,"url":"https://github.com/nextjournal/garden-id","last_synced_at":"2026-02-13T14:50:44.314Z","repository":{"id":193063161,"uuid":"688028942","full_name":"nextjournal/garden-id","owner":"nextjournal","description":"Authentication for application.garden","archived":false,"fork":false,"pushed_at":"2024-09-17T12:57:03.000Z","size":30,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-08-30T10:36:09.654Z","etag":null,"topics":["application-garden"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nextjournal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-06T13:57:06.000Z","updated_at":"2024-09-17T12:57:07.000Z","dependencies_parsed_at":"2023-09-07T13:26:16.221Z","dependency_job_id":"45f66c29-2c89-40d0-a4d5-3ac502294ca9","html_url":"https://github.com/nextjournal/garden-id","commit_stats":null,"previous_names":["nextjournal/clerk-garden-utils","nextjournal/garden-id"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nextjournal/garden-id","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextjournal%2Fgarden-id","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextjournal%2Fgarden-id/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextjournal%2Fgarden-id/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextjournal%2Fgarden-id/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nextjournal","download_url":"https://codeload.github.com/nextjournal/garden-id/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextjournal%2Fgarden-id/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272839630,"owners_count":25001860,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["application-garden"],"created_at":"2024-11-08T02:37:09.909Z","updated_at":"2026-02-13T14:50:39.265Z","avatar_url":"https://github.com/nextjournal.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nextjournal.garden-id\n\nSimplified authentication for [application.garden](https://application.garden) based on OpenID Connect.\n\n## Installation\n\nGarden ID is [hosted on GitHub](https://github.com/nextjournal/garden-id) so you can simply add it as a git dependency to your `deps.edn`:\n\n```clojure {:nextjournal.clerk/code-listing true}\n{io.github.nextjournal/garden-id {:git/sha \"\u003clatest-sha\u003e\"}}\n```\n\n## Usage\n\nWrap your Ring app with `ring.middleware.session/wrap-session` and `nextjournal.garden-id/wrap-auth`.\n\nRedirecting to the path in `nextjournal.garden-id/login-uri` will send the user to a login page. Upon successful login it redirects to \"/\" and user data is stored in the session.\n\nIn local development authentication is mocked and you can impersonate arbitrary users.\n\n## Authorization\n\nYou can configure authorization by passing a map as the second argument to `nextjournal.garden-id/wrap-auth`.\n\n### Github\n\nTo only allow certain Github users, members of a certain Github\norganization or team to access your application, use:\n\n`(nextjournal.garden-id/wrap-auth my-app {:github [RESTRICTIONS...]})`\n\nPossible restrictions are:\n\n* `{:login \"githubhandle\"}`: the user `githubhandle`\n* `{:id 1234567}`: the user with the Github ID 1234567\n* `{:login ifn}`: call ifn with the GitHub login handle, pass if returns true\n* `{:id ifn}`: call ifn with the GitHub id, pass if returns true\n* `{:organization \"myorg\"}`: members of the organization `myorg`.\n* `{:organization \"myorg\" :team \"myteam\"}`: members of the team `myteam` of the organization `myorg`.\n\nThe user is permitted if they pass any listed restriction.\n\nYou need a valid Github API token in the environment variable `GITHUB_API_TOKEN` that is scoped to read the organization members.\n\nUse an [application.garden secret](https://docs.apps.garden#secrets) to set this.\n\n### Apple ID\n\nTo only allow login with Apple ID, use:\n\n`(nextjournal.garden-id/wrap-auth my-app {:apple []})`\n\n## Example\n\nSee [example](https://github.com/nextjournal/garden-id/tree/main/example) for an example application.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextjournal%2Fgarden-id","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnextjournal%2Fgarden-id","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextjournal%2Fgarden-id/lists"}