The example uses the Casdoor demo site server and Casdoor.Client
SDK for .NET
in casdoor-dotnet-sdk.
The game in this example is based on ValleyOfCubes_Unity3D.
- download the code
git clone [email protected]:casdoor/casdoor-unity-example.git
- Open the newly downloaded code in
Unity Hub
and run it.
iOS | Android |
---|---|
iOS | Android |
---|---|
Initialization requires 6 parameters, which are all str type:
Name (in order) | Must | Description |
---|---|---|
Endpoint | Yes | Casdoor Server Url, such as https://door.casdoor.com |
OrganizationName | Yes | Organization name |
ApplicationName | Yes | Application name |
ApplicationType | Yes | webapp, webapi or native |
ClientId | Yes | Your client id |
ClientSecret | Yes | Your client secret |
var httpClient = new HttpClient();
var client = new CasdoorClient(HttpClient, new CasdoorOptions{
Endpoint = "https://door.casdoor.com",
OrganizationName = "build-in",
ApplicationName = "app-build-in",
ApplicationType = "native", // webapp, webapi or native
ClientId = "<your client id>",
ClientSecret = "<your client secret>",
});
This project is licensed under the Apache 2.0 license.