Search K
Appearance
Centias is a .NET package designed to simplify the development of admin panels.
Centias supports most modern web browsers such as:
Our package is distributed through a private NuGet feed. You need to generate an API token in your Centias account to access the feed.
Log into your Centias account and navigate to Account > API Tokens.
Click on New to create a new API token. You can name your token as you see fit.
After generating the token, copy it to your clipboard. Keep the token safe, after leaving the site you can't access it anymore. Should you lose your token, we recommend deleting the old one and generating a new one.
With your secret token you can configure access to the NuGet feed in two ways.
You can open a NuGet.Config
of your choice, that is applied by your NuGet client. Then add the following lines:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="centias.com" value="https://nuget.centias.com/v3/index.json" />
</packageSources>
<packageSourceCredentials>
<centias.com>
<add key="Username" value="YOUR_EMAIL_ADDRESS" />
<add key="ClearTextPassword" value="YOUR_API_TOKEN" />
</centias.com>
</packageSourceCredentials>
</configuration>
Input the following command into a terminal. Exchange YOUR_USERNAME and YOUR_API_TOKEN with your account-specific values. This command will add the source to your NuGet.Config
file that is highest in hierarchy. If you want to use a specific config file, you can do so by adding --configfile <FILE>
.
dotnet nuget add source https://nuget.centias.com/v3/index.json \
-n centias.com \
-u <YOUR_EMAIL_ADDRESS> \
-p <YOUR_API_TOKEN> \
--store-password-in-clear-text
WARNING
Whenever possible use a credential provider instead of storing your token in clear-text. You can refer to the nuget docs for more information.
On Windows machines you can encrypt your password. Please be aware that encryption is machine and user specific.
dotnet nuget add source https://nuget.centias.com \
-n Centias \
-u <YOUR_EMAIL_ADDRESS> \
-p <YOUR_API_TOKEN>
In your project, you can now access the Centias NuGet feed to download the package. You can install the package from the command line directly:
dotnet add package Linkerion.Centias
Or if you have a visual NuGet package manager, type in "Centias" in the search bar and choose the package published on the centias.com feed.
No license is needed on your local machine localhost
or 127.0.0.1
and other development environments with the following top-level domains:
.test
.example
.invalid
.local
.localhost
Staging environment subdomains are also included:
staging.
stage.
testing.
test.
dev.
development.
INFO
A protocol must be included in the base url. Use either http:// or https://, however, the latter will need an SSL certificate to function properly.
Change your port or domain as appropriate. A typical development configuration could look like this:
builder.Services.AddCentias(new CentiasOptions()
{
Title = "Parakeet Vans - Backend Demo",
BaseUrl = "https://parakeetvans.test",
LicenseKey = null
});
In production environments, Centias will validate your license. An active internet connection is required for this step.
You can link a license to your production domain by going to Licenses after logging into your Centias account. You will see an overview of all your current licenses. Click on Manage for the license you want to associate with a production domain.
On the details page of your license you can put in a domain of your choice.
WARNING
Make sure you double-check if your domain is written correctly. You can't change it afterwards.
Once you have set your domain, you will see it linked to your license.
You can now copy your license key to configure your Centias application for production.
The license key must be entered at one of the AddCentias()
, AddCentiasWithIdentity()
or AddCentiasWithEntra()
methods in your Program.cs
.
builder.Services.AddCentias(new CentiasOptions()
{
Title = YOUR_TITLE,
BaseUrl = YOUR_PRODUCTION_DOMAIN,
LicenseKey = YOUR_LICENSE_KEY
});
If license validation is not possible your application won't run in production.
You have successfully installed and configured Centias in your .NET project. If you want to get more familiar with the package you can try out our quickstart guide.