https://github.com/monocloud/dotnet-backend-quickstart
MonoCloud .NET Backend SDK Quickstart Repository
https://github.com/monocloud/dotnet-backend-quickstart
authentication dotnet-authentication monocloud
Last synced: 1 day ago
JSON representation
MonoCloud .NET Backend SDK Quickstart Repository
- Host: GitHub
- URL: https://github.com/monocloud/dotnet-backend-quickstart
- Owner: monocloud
- License: mit
- Created: 2026-07-02T07:16:13.000Z (5 days ago)
- Default Branch: main
- Last Pushed: 2026-07-02T11:34:42.000Z (4 days ago)
- Last Synced: 2026-07-02T13:24:09.278Z (4 days ago)
- Topics: authentication, dotnet-authentication, monocloud
- Language: C#
- Homepage: https://www.monocloud.com
- Size: 20.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## .NET Backend Quickstart
A **minimal ASP.NET Core (minimal API) example** showing how to protect API endpoints with access token validation using MonoCloud.
## What this repo shows
- MonoCloud access token validation with ASP.NET Core
- Endpoint protection via the standard authentication and authorization pipeline
- Accessing the authenticated user's claims
Built with [**`MonoCloud.Backend`**](https://www.nuget.org/packages/MonoCloud.Backend).
## Prerequisites
Before you begin:
1. In the [MonoCloud Dashboard](https://dashboard.monocloud.com/), create a new **API**
2. Set the **Audience** (for example `https://api.example.com`) — this uniquely identifies your API
3. Add a scope named `example-api` and mark the scope as a default scope
You'll also need the [.NET SDK](https://dotnet.microsoft.com/download) (8.0 or later).
## Configure the application
This repo reads its configuration from `appsettings.json`. Replace the placeholders with values from your API:
```json
"MonoCloud": {
"TenantDomain": "https://",
"Audience": "https://"
}
```
> Do not commit real secrets. For production, use environment variables, user secrets, or a secure secret store.
## Run locally
```bash
dotnet run
```
The server starts on `http://localhost:3000`.
## Test
```bash
curl -H "Authorization: Bearer " http://localhost:3000/api/protected
```
## 📘 Learn more
- **.NET Backend Quickstart:** [https://www.monocloud.com/docs/quickstarts/dotnet-backend](https://www.monocloud.com/docs/quickstarts/dotnet-backend?utm_source=github&utm_medium=dotnet_backend_quickstart)
- **.NET Backend SDK Docs:** [https://www.monocloud.com/docs/sdks/dotnet-backend](https://www.monocloud.com/docs/sdks/dotnet-backend/index?utm_source=github&utm_medium=dotnet_backend_quickstart)
- **API Reference:** [https://monocloud.github.io/backend-dotnet](https://monocloud.github.io/backend-dotnet?utm_source=github&utm_medium=dotnet_backend_quickstart)
## 🤝 Contributing & Support
### Issues & Feedback
- Use **GitHub Issues** for bug reports and feature requests.
- For tenant or account-specific help, contact MonoCloud Support through your dashboard.
### Security
Do **not** report security issues publicly. Please follow the contact instructions at: [https://www.monocloud.com/contact](https://www.monocloud.com/contact?utm_source=github&utm_medium=dotnet_backend_quickstart)
## License
Licensed under the **MIT License**. See the included [`LICENSE`](./LICENSE) file.