{"id":19504859,"url":"https://github.com/nice-digital/auth0-example-api","last_synced_at":"2025-02-25T22:13:17.328Z","repository":{"id":141113186,"uuid":"142128410","full_name":"nice-digital/auth0-example-api","owner":"nice-digital","description":"Example api with auth0 authentication","archived":false,"fork":false,"pushed_at":"2018-07-24T09:59:50.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-08T10:45:34.255Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nice-digital.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-07-24T08:26:11.000Z","updated_at":"2018-10-16T13:54:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"8b208618-2edf-44dd-89bf-6d8e46da3716","html_url":"https://github.com/nice-digital/auth0-example-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fauth0-example-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fauth0-example-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fauth0-example-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fauth0-example-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nice-digital","download_url":"https://codeload.github.com/nice-digital/auth0-example-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240754367,"owners_count":19852189,"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","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":"2024-11-10T22:27:27.718Z","updated_at":"2025-02-25T22:13:17.208Z","avatar_url":"https://github.com/nice-digital.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Auth0 ASP.NET Web API example\r\n\r\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\r\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\r\n\r\n\r\n- [What is it?](#what-is-it)\r\n- [Stack](#stack)\r\n- [Requirements](#requirements)\r\n- [Set up](#set-up)\r\n  - [Auth0 setup](#auth0-setup)\r\n  - [Local setup](#local-setup)\r\n- [Resources](#resources)\r\n\r\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\r\n\r\n## What is it?\r\nASP.NET (OWIN) Web API example project to test use of [Auth0](auth0.com) as \r\nan Identity Platform / NICE Accounts replacement\r\n  \r\n## Stack\r\n- .NET Framework 4.5.1\r\n- ASP.NET WebApi\r\n- OWIN OpenId Connect\r\n\r\n## Requirements\r\n- Visual Studio 2015+\r\n\r\n## Set up\r\n\r\n### Auth0 setup\r\n\r\n- Log into your [Auth0](auth0.com) account and go to the [API section](https://manage.auth0.com/#/apis)\r\n\r\n- Create a new API, e.g. `NICE API` with the identifier being the root of your API,\r\n e.g.: `http://localhost:56573/api` (This is only for identification purposes. \r\n Auth0 will not call the API)\r\n\r\n- Go into the API `Settings` and make note of the following settings that \r\nwill be used in this this apps' `Web.config`\r\n    - `Identifier` will be used in the `auth0:ApiIdentifier` setting\r\n\r\n- Go into the API `Scopes` tab and add a scope named `read:guidance`\r\n\r\n- Go into the API `Machine to Machine Appications` tab and make sure the `NICE API (Test Application)`\r\nis authorised. Expand the horizontal tab and select `read:guidance` scope and click `Update`\r\n\r\n- Go to the [Applications section](https://manage.auth0.com/#/applications) and select the `NICE API (Test Application)`\r\n\r\n- Make note of the following setting that will be used in the\r\n [API consuming app configuration](https://github.com/nhsevidence/auth0-example-asp/blob/master/Auth0ExampleAsp/Web.config)\r\n    - `Client ID` will be used in the  `auth0:ApiClientId` setting\r\n    - `Client Secret` will be used in the `auth0:ApiClientSecret` setting\r\n\r\n- Make note of the following setting that will be used in this apps' `Web.config`\r\n    - `Domain` will be used in the `auth0:Domain`\r\n\r\n### Local setup\r\n- Make sure port `56573` is free\r\n- In IIS create an Application Pool (CLR v4) and add a site using `{app_directory}\\Auth0ExampleApi` as the content directory\r\n- Configure it to use `localhost` as hostname and `56573` as port\r\n- Open the app in Visual Studio (2015+) and build it\r\n- Go to `http://localhost:56573/api` and see the available endpoints\r\n\r\n## Resources\r\n\r\n[Auth0 ASP.NET Web API (OWIN): Authorization](https://auth0.com/docs/quickstart/backend/webapi-owin/01-authorization)\r\n\r\n[Auth0 ASP.NET Web API (OWIN): Using your API](https://auth0.com/docs/quickstart/backend/webapi-owin/02-using)\r\n\r\n[Auth0 ASP.NET Web API (OWIN) code samples](https://github.com/auth0-samples/auth0-aspnet-owin-webapi-samples)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnice-digital%2Fauth0-example-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnice-digital%2Fauth0-example-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnice-digital%2Fauth0-example-api/lists"}