Rock Solid Knowledge's All-in-one .NET template provides a management UI(AdminUI) and a skeleton SSO solution built on OpenIddict, ready for you to customize to your exact requirements. This means you can have a solution up and running within less than 15 minutes of instantiating the template.
What is the All-In-One Template?
Rock Solid Knowledge has created a .NET template that sets up AdminUI and OpenIddict in the same .NET solution. This allows you to run AdminUI and OpenIddict directly from your IDE and get a feel for how everything works together.
Getting Started
Before getting started, you will need:
- A database server, either Microsoft SQL Server, MySql or PostgreSQL
- The connection string to connect to a database
- An AdminUI license key (Get a demo key from here)
Install the Template
To install the .NET template into your local template store, run the following command from the command line dotnet new install Rsk.AdminAllInOne.OpenIddict
You can check the template has been installed correctly by using the following command. dotnet new list RSK
Creating your SSO Solution
- Launch a command prompt
- Navigate to the folder that will contain the solution folder.
You are now ready to instantiate the template, but you will need to supply some parameters.
Parameters
Parameter | Description | Default |
---|---|---|
-n <Solution Name>
|
Your preferred name for your solution. | |
-db <Db Provider>
|
Your database provider. Options are: SqlServer, MySql or PostgreSql | SqlServer |
-c <Connection String>
|
Database connection string. This will vary based on the provider | |
-au <URL>
|
This is the URL where AdminUI will listen | https://localhost:5001 |
-iu <URL>
|
This is the URL where OpenIddict will listen | https://localhost:5003 |
Instantiating the Template
Run the following command from the command prompt with your preferred values.dotnet new adminui+openiddict -n MyAllInOneSolution -db SqlServer -c "Server=localhost;User Id=joe;Password=Password123!;Database=AllInOneDb;"
You should now have a folder called "MyAllInOneSolution". Inside this folder, there will be a MyAllInOneSolution.sln and two further folders
- MyAllInOneSolution.OpenIddict
- MyAllInOneSolution.OpenIddict.AdminUI
Open the .sln file in your favourite IDE.
Set the AdminUI License Key
From inside your IDE, navigate to the appsettings.json file in the AdminUI project and locate the property LicenseKey. Replace the value **** YOUR ADMINUI LICENSE KEY *** with your own.
You can request a demo AdminUI License Key from here
Running the Solution
You should now have all the code necessary for your SSO solution
From the IDE, run the OpenIddict project, on startup the solution will attempt to initialize the database using the dbprovider and connection string configured in the appsettings. Your connection string will need to be setup with a user with permissions to create a database.
Next run the AdminUI project. Once launched, navigate to the AdminUI site in your browser, by default https://localhost:5001. If everything is configured correctly the Login button should be enabled. Click on the Login button to redirect to OpenIddict to sign in.
You can sign in using the AdminUI bootstrap user with the following credentials
Username: Info@rocksolidknowledge.com
Password: Password123!
AdminUI will then require you to setup an Admin user.
What's next?
You now have an SSO solution ready to go; all you need now is to wire up an application to use SSO. A couple of useful resources below to get you started
If you have any questions regarding the template, please email support@openiddictcomponents.com.