Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/casdoor/casdoor-dotnet-desktop-example
.NET WPF desktop app example for Casdoor
https://github.com/casdoor/casdoor-dotnet-desktop-example
authentication authn casdoor desktop dotnet example iam oauth oauth2 oidc pkce sso wpf
Last synced: about 2 months ago
JSON representation
.NET WPF desktop app example for Casdoor
- Host: GitHub
- URL: https://github.com/casdoor/casdoor-dotnet-desktop-example
- Owner: casdoor
- License: apache-2.0
- Created: 2022-08-01T14:46:29.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-18T16:50:21.000Z (11 months ago)
- Last Synced: 2024-02-22T12:37:59.461Z (11 months ago)
- Topics: authentication, authn, casdoor, desktop, dotnet, example, iam, oauth, oauth2, oidc, pkce, sso, wpf
- Language: C#
- Homepage: https://github.com/casdoor/casdoor
- Size: 1.21 MB
- Stars: 0
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# casdoor-dotnet-desktop-example
This project was bootstrapped with [WPF](https://github.com/dotnet/wpf) and [dotnet](https://www.dot.net/).
![demo](demo.gif)
## Prerequisites
[dotnet6 sdk](https://dotnet.microsoft.com/en-us/download)
[webview2 runtime](https://developer.microsoft.com/zh-cn/microsoft-edge/webview2/#download-section) (It's already preinstalled in your windows generally)
## Init example
You need to init requires 5 parameters, which are all string type:
| Name | Description | File |
| ------------ | ------------------------------------------------------------------------------------------------------- | --------------------- |
| Domain | Your Casdoor server host/domain | `CasdoorVariables.cs` |
| ClientId | The Client ID of your Casdoor application | `CasdoorVariables.cs` |
| AppName | The name of your Casdoor application | `CasdoorVariables.cs` |
| CallbackUrl | The path of the callback URL for your Casdoor application, will be `casdoor://callback` if not provided | `CasdoorVariables.cs` |
| OrganizationName | The organizatio name of your Casdoor application | `CasdoorVariables.cs` |
| ApplicationType | Webapp, webapi or native | `CasdoorVariables.cs` |
| Scope | The scopes that the client is requesting | `CasdoorVariables.cs` |
| RequireHttpsMetadata | Whether require https for casdoor endpoint | `CasdoorVariables.cs` |If you don't set these parameters, this project will use the [Casdoor online demo](https://door.casdoor.com) as the defult Casdoor server and use the [Casnode](https://door.casdoor.com/applications/app-casnode) as the default Casdoor application.
## How to run it
### Visual Studio
1. Open casdoor-dotnet-desktop-example.sln
2. Press Ctrl + F5 to start### Command line
1. cd src/DesktopApp
2. dotnet run