{"id":40115903,"url":"https://github.com/dlcs/iiif-auth-v2","last_synced_at":"2026-01-19T12:10:07.033Z","repository":{"id":178959005,"uuid":"662528771","full_name":"dlcs/iiif-auth-v2","owner":"dlcs","description":"IIIF Authorization Flow API 2.0 implementation for IIIF Cloud Services/DLCS","archived":false,"fork":false,"pushed_at":"2024-08-13T09:55:17.000Z","size":384,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-08-13T11:44:24.602Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dlcs.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-07-05T10:25:35.000Z","updated_at":"2024-08-13T09:54:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"b85c72bd-6211-4dab-97f8-7b3d37525410","html_url":"https://github.com/dlcs/iiif-auth-v2","commit_stats":null,"previous_names":["dlcs/iiif-auth-v2"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/dlcs/iiif-auth-v2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlcs%2Fiiif-auth-v2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlcs%2Fiiif-auth-v2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlcs%2Fiiif-auth-v2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlcs%2Fiiif-auth-v2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dlcs","download_url":"https://codeload.github.com/dlcs/iiif-auth-v2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlcs%2Fiiif-auth-v2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28567863,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T08:53:44.001Z","status":"ssl_error","status_checked_at":"2026-01-19T08:52:40.245Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-19T12:10:06.638Z","updated_at":"2026-01-19T12:10:07.023Z","avatar_url":"https://github.com/dlcs.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IIIF Auth 2\n\nIIIF Auth v2 handles [IIIF Authorization Flow API 2.0](https://iiif.io/api/auth/2.0/) requests and is an implmementation of [DLCS RFC 012](https://github.com/dlcs/protagonist/blob/31bcd7db4d4856620b44b03e63d91d11e6832c62/docs/rfcs/012-auth-service.md)\n\n## Running\n\nThere is a Dockerfile and docker-compose file for running app:\n\n```bash\n# build docker image\ndocker build -t iiif-auth-2:local .  \n\n# run image\ndocker run -it --rm \\\n    --name iiif-auth-2 \\\n    -p \"8014:80\" \\\n    iiif-auth-2:local\n\n# run via docker-compose\ndocker compose up\n```\n\nFor local debugging the `docker-compose.local.yml` file can be used, this will start an empty Postgres instance.\n\n```bash\ndocker compose -f docker-compose.local.yml up\n```\n\n## Configuration\n\nThe following appSetting configuration values are supported:\n\n| Name                               | Description                                                                                                           | Default                                         |\n| ---------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |\n| OrchestratorRoot                   | Base URI for Orchestrator, used to generate links                                                                     |                                                 |\n| DefaultSignificantGestureTitle     | Fallback title to use on SignificantGesture.cshtml                                                                    | `\"Click to continue\"`                           |\n| DefaultSignificantGestureMessage   | Fallback message to use on SignificantGesture.cshtml                                                                  | `\"You will now be redirected to DLCS to login\"` |\n| Auth__CookieNameFormat             | Name of issued cookie, `{0}` value replaced with customer Id                                                          | `\"dlcs-auth2-{0}`                               |\n| Auth__SessionTtl                   | Default TTL for sessions + cookies (in seconds)                                                                       | 600                                             |\n| Auth__RefreshThreshold             | UserSession expiry not refreshed if LastChecked within this number of secs                                            | 120                                             |\n| Auth__JwksTtl                      | How long to cache results of JWKS calls for, in secs                                                                  | 600                                             |\n| GesturePathTemplateForDomain       | Dictionary that allows control of domain-specific significant gesture paths. `{customerId}` replaced.                 |                                                 |\n| OAuthCallbackPathTemplateForDomain | Dictionary that allows control of domain-specific oauth2 callback paths. `{customerId}` + `{accessService}` replaced. |                                                 |\n\n\u003e A note on Dictionarys for domain-specific paths. A key of `\"Default\"` serves as fallback but isn't necessary if the default value matches the canonical DLCS path.\n\n## Migrations\n\nMigrations can be added by running the following:\n\n```bash\ncd src/IIIFAuth2\n\ndotnet ef migrations add \"{migration-name}\" -p IIIFAuth2.API -o Data/Migrations\n```\n\nMigrations are applied on startup, regardless of environment, if `\"RunMigrations\" = \"true\"`.\n\n## Local Development\n\nThis service is an extension of [DLCS Protagonist](https://github.com/dlcs/protagonist/) and once deployed will run under the same host as the main DLCS.\n\nBelow are steps for running iiif-auth-v2 and Orchestrator locally:\n\n1. Create a `customer_cookie_domain` for required customer (e.g. 99). As orchestrator and iiif-auth-v2 will be running on different ports this is necessary as otherwise orchestrator won't see required cookies.\n   * `INSERT INTO customer_cookie_domains (customer, domains) values (99, 'localhost');`\n2. In iiif-auth-v2 set `\"OrchestratorRoot\": \"https://localhost:5003\"` appSetting (default from orchestrator launchSettings)\n3. In orchestrator set `\"Auth__Auth2ServiceRoot\": \"https://localhost:7049/auth/v2/\"` appSetting (default from orchestrator launchSettings)\n4. In orchestrator change the last line of `ConfigDrivenAuthPathGenerator.GetAuth2PathForRequest` to:\n```cs\nvar auth2PathForRequest = request.GetDisplayUrl(path, includeQueryParams: false);\nreturn auth2PathForRequest.Contains(\"probe\") ? auth2PathForRequest : auth2PathForRequest.Replace(host, \"localhost:7049\");\n```\n\n\u003e Point 4 is a hack and should be addressed in a better manner. It is required as the default path rewrite rules won't work as all auth paths aren't on the root domain","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlcs%2Fiiif-auth-v2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdlcs%2Fiiif-auth-v2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlcs%2Fiiif-auth-v2/lists"}