https://github.com/softeq/netkit.auth
https://github.com/softeq/netkit.auth
dotnet dotnetcore identityserver4 netkit
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/softeq/netkit.auth
- Owner: Softeq
- License: mit
- Created: 2019-02-11T12:19:35.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T20:21:21.000Z (over 3 years ago)
- Last Synced: 2025-03-22T15:13:32.885Z (about 1 year ago)
- Topics: dotnet, dotnetcore, identityserver4, netkit
- Language: C#
- Size: 331 KB
- Stars: 0
- Watchers: 11
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# Softeq.Netkit.Auth
Open source product is used to communicate people in real time.
This project uses ASP.NET Core 2.2
## About
This project is maintained by Softeq Development Corp.
We specialize in .NET core applications.
## Get started
Initially, there are created 2 default roles and users in the database:
```json
{
"Roles": [
"User",
"Admin"
],
"Users": [
{
"Email": "user@test.test",
"Password": "123QWqw!",
"Role": "User"
},
{
"Email": "admin@test.test",
"Password": "123QWqw!",
"Role": "Admin",
}
]
}
```
To change initial data edit SeedValues.json file
## Use
To receive access and refresh token by user credentials send the following request:
POST /connect/token
```csharp
var values = new Dictionary
{
{ "grant_type", "password" },
{ "password", "userPassword" },
{ "username", "userName" },
{ "scope", "offline_access" },
{ "client_id", "clientId" },
{ "client_secret", "clientSecret" }
};
var content = new FormUrlEncodedContent(values);
var response = await httpClient.PostAsync($"{authServerUrl}/connect/token", content);
```
To receive access and refresh token by refresh token send the following request:
POST /connect/token
```csharp
var values = new Dictionary
{
{ "grant_type", "refresh_token" },
{ "scope", "offline_access" },
{ "client_id", "clientId" },
{ "client_secret", "clientSecret" },
{ "refresh_token", "refreshToken" }
};
var content = new FormUrlEncodedContent(values);
var response = await httpClient.PostAsync($"{authServerUrl}/connect/token", content);
```
## Contributing
We welcome any contributions.
## License
The Query Utils project is available for free use, as described by the [LICENSE](/LICENSE) (MIT).