last ...
This commit is contained in:
+10
-1
@@ -6,6 +6,7 @@ using xIds.Providers;
|
||||
using Newtonsoft.Json;
|
||||
using xIds.Interfaces;
|
||||
using System.Reflection;
|
||||
using xLoggingService.DI;
|
||||
using xStorageService.DI;
|
||||
using xCommons.Extensions;
|
||||
using xCommons.Configurations;
|
||||
@@ -29,6 +30,7 @@ namespace xIds
|
||||
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddXLoggingService(Configuration);
|
||||
//
|
||||
// Register Validation Provider and all XCommons Module Services ...
|
||||
services.AddXCommons(Configuration);
|
||||
@@ -78,7 +80,11 @@ namespace xIds
|
||||
services.AddSingleton<IXSecurityProvider, XSecurityProvider>();
|
||||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILogger<Startup> logger)
|
||||
public void Configure(
|
||||
IApplicationBuilder app,
|
||||
IWebHostEnvironment env,
|
||||
ILogger<Startup> logger
|
||||
)
|
||||
{
|
||||
//
|
||||
if (env.IsDevelopment())
|
||||
@@ -125,3 +131,6 @@ namespace xIds
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
+431
-390
@@ -1,397 +1,438 @@
|
||||
{
|
||||
"Version": "0.1",
|
||||
"XPoweredValue": "SaherElmITCenter",
|
||||
"Name": "xIdentityServer",
|
||||
"WelcomeMessage": "Welcome to xSaherElm Project's xIdentityServer",
|
||||
"AllowedOrigins": [
|
||||
"https://saherelm.ir",
|
||||
"https://saherelmhub.ir",
|
||||
"https://api.saherelm.ir",
|
||||
"https://api.saherelmhub.ir"
|
||||
],
|
||||
"SwaggerConfiguration": {
|
||||
"Version": "v1.0",
|
||||
"Title": "xSaherElm Identity Server API",
|
||||
"Description": "Complete API Documentation",
|
||||
"Contact": {
|
||||
"Name": "Hadi Khazaee Asl",
|
||||
"Email": "hadi_khazaee_asl@yahoo.com",
|
||||
"Url": "https://www.saherelm.ir"
|
||||
}
|
||||
},
|
||||
"DbProvider": "SQLite",
|
||||
"ConnectionStrings": {
|
||||
"IdentityDb": "Filename=./Db/XIdentity.db;Foreign Keys=False",
|
||||
"ConfigurationDb": "Filename=./Db/XConfigurations.db",
|
||||
"PersistedGrantDb": "Filename=./Db/XPersistedGrants.db"
|
||||
},
|
||||
"DataServiceConfiguration": {
|
||||
"PagingConfiguration": {
|
||||
"DefaultPageSize": 20,
|
||||
"MaxAvailablePageSize": 400,
|
||||
"MinAvailablePageSize": 20
|
||||
}
|
||||
},
|
||||
"Certificates": {
|
||||
"IdentityServerSigning": {
|
||||
"Path": "Certificate/xIds.pfx",
|
||||
"Secret": "s@1694056"
|
||||
}
|
||||
},
|
||||
"IdentityConfiguration": {
|
||||
"IdentityIssuer": "SaherElm Identity Server",
|
||||
"IdentityAudience": "SaherElmIdentityAPI",
|
||||
"IdentitySecretKey": "SaherElmITCenter@1694056",
|
||||
"ActionTokenExpirationDateProvider": "20m",
|
||||
"IdentityRoles": [
|
||||
"admin",
|
||||
"responsible_manager",
|
||||
"journalist",
|
||||
"chief_clerk",
|
||||
"chief_clerk_assistant",
|
||||
"actuary",
|
||||
"actuary_assistant",
|
||||
"reporter",
|
||||
"reporter_assistant",
|
||||
"agent",
|
||||
"user"
|
||||
],
|
||||
"AutoConfirmNewUsersEmail": false,
|
||||
"AutoConfirmNewUsersPhoneNumber": false,
|
||||
"RegistrationJustWithInvite": false,
|
||||
"RequireRegistrationConfirm": true,
|
||||
"MaxNumberOfVerificationCodeSend": 3,
|
||||
"DeleyBetweenTwoVerificationCode": 180,
|
||||
"NewUsersRole": "user",
|
||||
"Policy": {
|
||||
"Lockout": {
|
||||
"LockoutTimeSpanProvider": "15m",
|
||||
"MaxFailedAccessAttempts": 5,
|
||||
"AllowedForNewUsers": true
|
||||
},
|
||||
"Password": {
|
||||
"RequireDigit": true,
|
||||
"RequiredLength": 6,
|
||||
"RequiredUniqueChars": 1,
|
||||
"RequireLowercase": true,
|
||||
"RequireNonAlphanumeric": true,
|
||||
"RequireUppercase": true
|
||||
},
|
||||
"SignIn": {
|
||||
"RequiredEnabled": true,
|
||||
"RequireConfirmedEmail": true,
|
||||
"RequireConfirmedPhoneNumber": false
|
||||
},
|
||||
"User": {
|
||||
"AllowedUserNameCharacters": "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._",
|
||||
"RequireUniqueEmail": true,
|
||||
"MinLength": 6,
|
||||
"MaxLength": 20,
|
||||
"MinAgeForRegistration": 18,
|
||||
"MaxAgeForRegistration": 60,
|
||||
"InvalidUserNames": [
|
||||
"Version": "0.1",
|
||||
"XPoweredValue": "SaherElmITCenter",
|
||||
"Name": "xIdentityServer",
|
||||
"WelcomeMessage": "Welcome to xSaherElm Project's xIdentityServer",
|
||||
"AllowedOrigins": [
|
||||
"https://saherelm.ir",
|
||||
"https://saherelmhub.ir",
|
||||
"https://api.saherelm.ir",
|
||||
"https://api.saherelmhub.ir"
|
||||
],
|
||||
"SwaggerConfiguration": {
|
||||
"Version": "v1.0",
|
||||
"Title": "xSaherElm Identity Server API",
|
||||
"Description": "Complete API Documentation",
|
||||
"Contact": {
|
||||
"Name": "Hadi Khazaee Asl",
|
||||
"Email": "hadi_khazaee_asl@yahoo.com",
|
||||
"Url": "https://www.saherelm.ir"
|
||||
}
|
||||
},
|
||||
"DbProvider": "SQLite",
|
||||
"ConnectionStrings": {
|
||||
"IdentityDb": "Filename=./Db/XIdentity.db;Foreign Keys=False",
|
||||
"ConfigurationDb": "Filename=./Db/XConfigurations.db",
|
||||
"PersistedGrantDb": "Filename=./Db/XPersistedGrants.db"
|
||||
},
|
||||
"DataServiceConfiguration": {
|
||||
"PagingConfiguration": {
|
||||
"DefaultPageSize": 20,
|
||||
"MaxAvailablePageSize": 400,
|
||||
"MinAvailablePageSize": 20
|
||||
}
|
||||
},
|
||||
"Certificates": {
|
||||
"IdentityServerSigning": {
|
||||
"Path": "Certificate/xIds.pfx",
|
||||
"Secret": "s@1694056"
|
||||
}
|
||||
},
|
||||
"IdentityConfiguration": {
|
||||
"IdentityIssuer": "SaherElm Identity Server",
|
||||
"IdentityAudience": "SaherElmIdentityAPI",
|
||||
"IdentitySecretKey": "SaherElmITCenter@1694056",
|
||||
"ActionTokenExpirationDateProvider": "20m",
|
||||
"IdentityRoles": [
|
||||
"admin",
|
||||
"responsible_manager",
|
||||
"journalist",
|
||||
"chief_clerk",
|
||||
"chief_clerk_assistant",
|
||||
"actuary",
|
||||
"actuary_assistant",
|
||||
"reporter",
|
||||
"reporter_assistant",
|
||||
"agent",
|
||||
"user"
|
||||
],
|
||||
"AutoConfirmNewUsersEmail": false,
|
||||
"AutoConfirmNewUsersPhoneNumber": false,
|
||||
"RegistrationJustWithInvite": false,
|
||||
"RequireRegistrationConfirm": true,
|
||||
"MaxNumberOfVerificationCodeSend": 3,
|
||||
"DeleyBetweenTwoVerificationCode": 180,
|
||||
"NewUsersRole": "user",
|
||||
"Policy": {
|
||||
"Lockout": {
|
||||
"LockoutTimeSpanProvider": "15m",
|
||||
"MaxFailedAccessAttempts": 5,
|
||||
"AllowedForNewUsers": true
|
||||
},
|
||||
"Password": {
|
||||
"RequireDigit": true,
|
||||
"RequiredLength": 6,
|
||||
"RequiredUniqueChars": 1,
|
||||
"RequireLowercase": true,
|
||||
"RequireNonAlphanumeric": true,
|
||||
"RequireUppercase": true
|
||||
},
|
||||
"SignIn": {
|
||||
"RequiredEnabled": true,
|
||||
"RequireConfirmedEmail": true,
|
||||
"RequireConfirmedPhoneNumber": false
|
||||
},
|
||||
"User": {
|
||||
"AllowedUserNameCharacters": "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._",
|
||||
"RequireUniqueEmail": true,
|
||||
"MinLength": 6,
|
||||
"MaxLength": 20,
|
||||
"MinAgeForRegistration": 18,
|
||||
"MaxAgeForRegistration": 60,
|
||||
"InvalidUserNames": [
|
||||
"saherelm",
|
||||
"admin",
|
||||
"responsible_manager",
|
||||
"journalist",
|
||||
"chief_clerk",
|
||||
"chief_clerk_assistant",
|
||||
"actuary",
|
||||
"actuary_assistant",
|
||||
"reporter",
|
||||
"reporter_assistant",
|
||||
"agent",
|
||||
"user"
|
||||
]
|
||||
},
|
||||
"Profile": {
|
||||
"ContainsEmail": false,
|
||||
"ContainsPhoneNumber": false,
|
||||
"ContainsRoles": true,
|
||||
"ContainsLastLogin": false,
|
||||
"ContainsDateOfBirth": false,
|
||||
"ContainsCreationDate": true
|
||||
}
|
||||
},
|
||||
"IdentityMessages": [
|
||||
{
|
||||
"Language": "fa-IR",
|
||||
"ResourceTitle": "user_invite_msg",
|
||||
"TranslatedValue": "شما دعوت شده اید تا در سامانه ثبت نام کنید"
|
||||
},
|
||||
{
|
||||
"Language": "en-US",
|
||||
"ResourceTitle": "user_invite_msg",
|
||||
"TranslatedValue": "You are Invited to Register at Dashboard"
|
||||
},
|
||||
{
|
||||
"Language": "fa-IR",
|
||||
"ResourceTitle": "registration_approve_msg",
|
||||
"TranslatedValue": "شما باید حساب کاربری خود را با ورود به پیوند زیر فعال کنید"
|
||||
},
|
||||
{
|
||||
"Language": "en-US",
|
||||
"ResourceTitle": "registration_approve_msg",
|
||||
"TranslatedValue": "you must activate your account by going to this link"
|
||||
},
|
||||
{
|
||||
"Language": "fa-IR",
|
||||
"ResourceTitle": "registered_msg",
|
||||
"TranslatedValue": "ثبت نام شما در سامانه با موفقیت پایان یافت"
|
||||
},
|
||||
{
|
||||
"Language": "en-US",
|
||||
"ResourceTitle": "registered_msg",
|
||||
"TranslatedValue": "you successfully registered at Dashboard"
|
||||
},
|
||||
{
|
||||
"Language": "fa-IR",
|
||||
"ResourceTitle": "verification_code_msg",
|
||||
"TranslatedValue": "کد اعتبار سنجی شما در سامانه"
|
||||
},
|
||||
{
|
||||
"Language": "en-US",
|
||||
"ResourceTitle": "verification_code_msg",
|
||||
"TranslatedValue": "Your Verification Code at Dashboard"
|
||||
},
|
||||
{
|
||||
"Language": "fa-IR",
|
||||
"ResourceTitle": "change_password_msg",
|
||||
"TranslatedValue": "برای تغییر کلمه عبور پیوند زیر را دنبال کنید"
|
||||
},
|
||||
{
|
||||
"Language": "en-US",
|
||||
"ResourceTitle": "change_password_msg",
|
||||
"TranslatedValue": "for change password please follow this link"
|
||||
},
|
||||
{
|
||||
"Language": "fa-IR",
|
||||
"ResourceTitle": "password_changed_msg",
|
||||
"TranslatedValue": "کلمه عبور شما در سامانه تغییر یافت"
|
||||
},
|
||||
{
|
||||
"Language": "en-US",
|
||||
"ResourceTitle": "password_changed_msg",
|
||||
"TranslatedValue": "your password at Dashboard changed"
|
||||
},
|
||||
{
|
||||
"Language": "fa-IR",
|
||||
"ResourceTitle": "new_device_logged_in_msg",
|
||||
"TranslatedValue": "ابزار جدیدی با مشخصات ذیل در سامانه با حساب کاربری شما وارد شده است"
|
||||
},
|
||||
{
|
||||
"Language": "en-US",
|
||||
"ResourceTitle": "new_device_logged_in_msg",
|
||||
"TranslatedValue": "new device with following details loggedin with your account in Dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"IdentityResourceConfiguration": {
|
||||
"Authority": "https://172.18.0.151",
|
||||
"ApiName": "xSaherElmAPI",
|
||||
"ApiSecret": "s@H@1694056",
|
||||
"ClientId": "xSaherElmAPIClient",
|
||||
"ClientSecret": "s@H@1694056",
|
||||
"XPoweredValue": "SaherElmITCenter",
|
||||
"XRevisionSecretKey": "SaherElmITCenter@1694056"
|
||||
},
|
||||
"StorageConfiguration": {
|
||||
"Authority": "https://ids.saherelm.ir",
|
||||
"IdentityAuthority": "https://ids.saherelm.ir",
|
||||
"Storage": "Storage",
|
||||
"Temp": "Temp",
|
||||
"Thumb": "Thumb",
|
||||
"Uploads": "Uploads",
|
||||
"Widgets": "Widgets",
|
||||
"Image": "Image",
|
||||
"Audio": "Audio",
|
||||
"Video": "Video",
|
||||
"Document": "Document",
|
||||
"FilePrefix": "xSaherElm_",
|
||||
"ThumbPrefix": "Thumb_",
|
||||
"ThumbSize": 512,
|
||||
"ThumbQuality": 72,
|
||||
"MaxFileSize": 41943040
|
||||
},
|
||||
"MessageConfiguration": {
|
||||
"MailConfigurations": {
|
||||
"gmail": {
|
||||
"Title": "SaherElm Dashboard",
|
||||
"Host": "smtp.gmail.com",
|
||||
"Port": 587,
|
||||
"EnableSsl": true,
|
||||
"Username": "saherelm@gmail.com",
|
||||
"Password": "vzuz gtrk tndb ctbc"
|
||||
}
|
||||
},
|
||||
"SmsConfigurations": {
|
||||
"yoursms": {
|
||||
"ServiceUrl": "http://sms.yourprovider.ir",
|
||||
"Username": "user",
|
||||
"Password": "psw",
|
||||
"LineNumber": "linenumber",
|
||||
"UserApiKey": "",
|
||||
"SecretKey": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"DbSeeder": {
|
||||
"UpdateExists": false,
|
||||
"Clients": [
|
||||
{
|
||||
"ClientId": "xSaherElmAPIClient",
|
||||
"ClientName": "Web Client of xMabsut API",
|
||||
"ClientSecrets": [
|
||||
{
|
||||
"Description": null,
|
||||
"Value": "NKaAKXeE9Ws+VVGGHsmM9DUO84cla4+hvx8swP1uuEg=",
|
||||
"Expiration": null,
|
||||
"Type": "SharedSecret"
|
||||
}
|
||||
],
|
||||
"Enabled": true,
|
||||
"RedirectUris": ["https://localhost:5001/signin-oidc"],
|
||||
"AllowedGrantTypes": [
|
||||
"hybrid",
|
||||
"password",
|
||||
"client_credentials"
|
||||
],
|
||||
"AllowedScopes": [
|
||||
"IdentityServerApi",
|
||||
"openid",
|
||||
"profile",
|
||||
"XAPI.read",
|
||||
"XAPI.write",
|
||||
"XAPI.admin",
|
||||
"manage",
|
||||
"offline_access"
|
||||
],
|
||||
"AllowedCorsOrigins": [
|
||||
"http://saherelm.ir",
|
||||
"admin",
|
||||
"responsible_manager",
|
||||
"journalist",
|
||||
"chief_clerk",
|
||||
"chief_clerk_assistant",
|
||||
"actuary",
|
||||
"actuary_assistant",
|
||||
"reporter",
|
||||
"reporter_assistant",
|
||||
"agent",
|
||||
"user"
|
||||
]
|
||||
},
|
||||
"Profile": {
|
||||
"ContainsEmail": false,
|
||||
"ContainsPhoneNumber": false,
|
||||
"ContainsRoles": true,
|
||||
"ContainsLastLogin": false,
|
||||
"ContainsDateOfBirth": false,
|
||||
"ContainsCreationDate": true
|
||||
}
|
||||
},
|
||||
"IdentityMessages": [
|
||||
{
|
||||
"Language": "fa-IR",
|
||||
"ResourceTitle": "user_invite_msg",
|
||||
"TranslatedValue": "شما دعوت شده اید تا در سامانه ثبت نام کنید"
|
||||
},
|
||||
{
|
||||
"Language": "en-US",
|
||||
"ResourceTitle": "user_invite_msg",
|
||||
"TranslatedValue": "You are Invited to Register at Dashboard"
|
||||
},
|
||||
{
|
||||
"Language": "fa-IR",
|
||||
"ResourceTitle": "registration_approve_msg",
|
||||
"TranslatedValue": "شما باید حساب کاربری خود را با ورود به پیوند زیر فعال کنید"
|
||||
},
|
||||
{
|
||||
"Language": "en-US",
|
||||
"ResourceTitle": "registration_approve_msg",
|
||||
"TranslatedValue": "you must activate your account by going to this link"
|
||||
},
|
||||
{
|
||||
"Language": "fa-IR",
|
||||
"ResourceTitle": "registered_msg",
|
||||
"TranslatedValue": "ثبت نام شما در سامانه با موفقیت پایان یافت"
|
||||
},
|
||||
{
|
||||
"Language": "en-US",
|
||||
"ResourceTitle": "registered_msg",
|
||||
"TranslatedValue": "you successfully registered at Dashboard"
|
||||
},
|
||||
{
|
||||
"Language": "fa-IR",
|
||||
"ResourceTitle": "verification_code_msg",
|
||||
"TranslatedValue": "کد اعتبار سنجی شما در سامانه"
|
||||
},
|
||||
{
|
||||
"Language": "en-US",
|
||||
"ResourceTitle": "verification_code_msg",
|
||||
"TranslatedValue": "Your Verification Code at Dashboard"
|
||||
},
|
||||
{
|
||||
"Language": "fa-IR",
|
||||
"ResourceTitle": "change_password_msg",
|
||||
"TranslatedValue": "برای تغییر کلمه عبور پیوند زیر را دنبال کنید"
|
||||
},
|
||||
{
|
||||
"Language": "en-US",
|
||||
"ResourceTitle": "change_password_msg",
|
||||
"TranslatedValue": "for change password please follow this link"
|
||||
},
|
||||
{
|
||||
"Language": "fa-IR",
|
||||
"ResourceTitle": "password_changed_msg",
|
||||
"TranslatedValue": "کلمه عبور شما در سامانه تغییر یافت"
|
||||
},
|
||||
{
|
||||
"Language": "en-US",
|
||||
"ResourceTitle": "password_changed_msg",
|
||||
"TranslatedValue": "your password at Dashboard changed"
|
||||
},
|
||||
{
|
||||
"Language": "fa-IR",
|
||||
"ResourceTitle": "new_device_logged_in_msg",
|
||||
"TranslatedValue": "ابزار جدیدی با مشخصات ذیل در سامانه با حساب کاربری شما وارد شده است"
|
||||
},
|
||||
{
|
||||
"Language": "en-US",
|
||||
"ResourceTitle": "new_device_logged_in_msg",
|
||||
"TranslatedValue": "new device with following details loggedin with your account in Dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"IdentityResourceConfiguration": {
|
||||
"Authority": "https://172.18.0.151",
|
||||
"ApiName": "xSaherElmAPI",
|
||||
"ApiSecret": "s@H@1694056",
|
||||
"ClientId": "xSaherElmAPIClient",
|
||||
"ClientSecret": "s@H@1694056",
|
||||
"XPoweredValue": "SaherElmITCenter",
|
||||
"XRevisionSecretKey": "SaherElmITCenter@1694056"
|
||||
},
|
||||
"StorageConfiguration": {
|
||||
"Authority": "https://ids.saherelm.ir",
|
||||
"IdentityAuthority": "https://ids.saherelm.ir",
|
||||
"Storage": "Storage",
|
||||
"Temp": "Temp",
|
||||
"Thumb": "Thumb",
|
||||
"Uploads": "Uploads",
|
||||
"Widgets": "Widgets",
|
||||
"Image": "Image",
|
||||
"Audio": "Audio",
|
||||
"Video": "Video",
|
||||
"Document": "Document",
|
||||
"FilePrefix": "xSaherElm_",
|
||||
"ThumbPrefix": "Thumb_",
|
||||
"ThumbSize": 512,
|
||||
"ThumbQuality": 72,
|
||||
"MaxFileSize": 41943040
|
||||
},
|
||||
"MessageConfiguration": {
|
||||
"MailConfigurations": {
|
||||
"gmail": {
|
||||
"Title": "SaherElm Dashboard",
|
||||
"Host": "smtp.gmail.com",
|
||||
"Port": 587,
|
||||
"EnableSsl": true,
|
||||
"Username": "saherelm@gmail.com",
|
||||
"Password": "vzuz gtrk tndb ctbc"
|
||||
}
|
||||
},
|
||||
"SmsConfigurations": {
|
||||
"yoursms": {
|
||||
"ServiceUrl": "http://sms.yourprovider.ir",
|
||||
"Username": "user",
|
||||
"Password": "psw",
|
||||
"LineNumber": "linenumber",
|
||||
"UserApiKey": "",
|
||||
"SecretKey": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"DbSeeder": {
|
||||
"UpdateExists": false,
|
||||
"Clients": [
|
||||
{
|
||||
"ClientId": "xSaherElmAPIClient",
|
||||
"ClientName": "Web Client of xMabsut API",
|
||||
"ClientSecrets": [
|
||||
{
|
||||
"Description": null,
|
||||
"Value": "NKaAKXeE9Ws+VVGGHsmM9DUO84cla4+hvx8swP1uuEg=",
|
||||
"Expiration": null,
|
||||
"Type": "SharedSecret"
|
||||
}
|
||||
],
|
||||
"Enabled": true,
|
||||
"RedirectUris": [
|
||||
"https://localhost:5001/signin-oidc"
|
||||
],
|
||||
"AllowedGrantTypes": [
|
||||
"hybrid",
|
||||
"password",
|
||||
"client_credentials"
|
||||
],
|
||||
"AllowedScopes": [
|
||||
"IdentityServerApi",
|
||||
"openid",
|
||||
"profile",
|
||||
"XAPI.read",
|
||||
"XAPI.write",
|
||||
"XAPI.admin",
|
||||
"manage",
|
||||
"offline_access"
|
||||
],
|
||||
"AllowedCorsOrigins": [
|
||||
"http://saherelm.ir",
|
||||
"https://saherelm.ir",
|
||||
"http://saherelmhub.ir",
|
||||
"https://saherelmhub.ir"
|
||||
],
|
||||
"AllowOfflineAccess": true,
|
||||
"RefreshTokenUsage": 1,
|
||||
"AccessTokenType": 1,
|
||||
"RefreshTokenExpiration": 0,
|
||||
"AbsoluteRefreshTokenLifetime": 2592000,
|
||||
"SlidingRefreshTokenLifetime": 1296000,
|
||||
"UpdateAccessTokenClaimsOnRefresh": true,
|
||||
"IdentityTokenLifetime": 300,
|
||||
"AccessTokenLifetime": 3600,
|
||||
"AuthorizationCodeLifetime": 300,
|
||||
"DeviceCodeLifetime": 300
|
||||
}
|
||||
],
|
||||
"IdentityResources": ["openid", "profile", "email", "role"],
|
||||
"ApiResources": [
|
||||
{
|
||||
"Name": "IdentityServerApi"
|
||||
},
|
||||
{
|
||||
"Name": "xSaherElmAPI",
|
||||
"DisplayName": "xSaherElm API",
|
||||
"Description": "Protected by IdentityServer API Access",
|
||||
"ApiSecrets": [
|
||||
{
|
||||
"Description": null,
|
||||
"Value": "NKaAKXeE9Ws+VVGGHsmM9DUO84cla4+hvx8swP1uuEg=",
|
||||
"Expiration": null,
|
||||
"Type": "SharedSecret"
|
||||
}
|
||||
],
|
||||
"Enabled": true,
|
||||
"Scopes": [
|
||||
"openid",
|
||||
"profile",
|
||||
"XAPI.read",
|
||||
"XAPI.write",
|
||||
"XAPI.admin",
|
||||
"manage"
|
||||
],
|
||||
"UserClaims": [
|
||||
"name",
|
||||
"role",
|
||||
"unique_name",
|
||||
"gender",
|
||||
"birthdate",
|
||||
"picture",
|
||||
"email",
|
||||
"phone_number",
|
||||
"email_verified",
|
||||
"phone_number_verified",
|
||||
"is_enabled",
|
||||
"is_banned",
|
||||
"creation_date",
|
||||
"last_login",
|
||||
"given_name",
|
||||
"family_name"
|
||||
]
|
||||
}
|
||||
],
|
||||
"ApiScopes": [
|
||||
{
|
||||
"Name": "IdentityServerApi"
|
||||
},
|
||||
{
|
||||
"Name": "xSaherElmAPI"
|
||||
},
|
||||
{
|
||||
"Name": "XAPI.read",
|
||||
"DisplayName": "Read Access for XAPI"
|
||||
},
|
||||
{
|
||||
"Name": "XAPI.write",
|
||||
"DisplayName": "Write Access for XAPI"
|
||||
},
|
||||
{
|
||||
"Name": "XAPI.admin",
|
||||
"DisplayName": "Admin Access for XAPI"
|
||||
},
|
||||
{
|
||||
"Name": "manage",
|
||||
"DisplayName": "Admin Access for All APIs"
|
||||
}
|
||||
],
|
||||
"Users": [
|
||||
{
|
||||
"Id": "b5713f9f-34f4-49b2-9680-b71e2b2de969",
|
||||
"FirstName": "Hadi",
|
||||
"LastName": "Khazaee Asl",
|
||||
"UserName": "admin",
|
||||
"Email": "hadi_khazaee_asl@yahoo.com",
|
||||
"EmailConfirmed": true,
|
||||
"PhoneNumber": "+989121694056",
|
||||
"PhoneNumberConfirmed": true,
|
||||
"Password": "s@H@1694056",
|
||||
"Role": "admin",
|
||||
"DateOfBirth": "1982-09-17 20:30:00.0000000",
|
||||
"IsEnable": true
|
||||
},
|
||||
{
|
||||
"Id": "83b09f5e-edd2-4e9a-8c5f-c4c129ee9d52",
|
||||
"FirstName": "Hadi",
|
||||
"LastName": "Khazaee Asl",
|
||||
"UserName": "agent",
|
||||
"Email": "hadi.khazaee.asl@gmail.com",
|
||||
"EmailConfirmed": true,
|
||||
"PhoneNumber": "+989101879789",
|
||||
"PhoneNumberConfirmed": true,
|
||||
"Password": "a@A@1694056",
|
||||
"Role": "agent",
|
||||
"DateOfBirth": "1982-09-17 20:30:00.0000000",
|
||||
"IsEnable": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
"AllowOfflineAccess": true,
|
||||
"RefreshTokenUsage": 1,
|
||||
"AccessTokenType": 1,
|
||||
"RefreshTokenExpiration": 0,
|
||||
"AbsoluteRefreshTokenLifetime": 2592000,
|
||||
"SlidingRefreshTokenLifetime": 1296000,
|
||||
"UpdateAccessTokenClaimsOnRefresh": true,
|
||||
"IdentityTokenLifetime": 300,
|
||||
"AccessTokenLifetime": 3600,
|
||||
"AuthorizationCodeLifetime": 300,
|
||||
"DeviceCodeLifetime": 300
|
||||
}
|
||||
],
|
||||
"IdentityResources": [
|
||||
"openid",
|
||||
"profile",
|
||||
"email",
|
||||
"role"
|
||||
],
|
||||
"ApiResources": [
|
||||
{
|
||||
"Name": "IdentityServerApi"
|
||||
},
|
||||
{
|
||||
"Name": "xSaherElmAPI",
|
||||
"DisplayName": "xSaherElm API",
|
||||
"Description": "Protected by IdentityServer API Access",
|
||||
"ApiSecrets": [
|
||||
{
|
||||
"Description": null,
|
||||
"Value": "NKaAKXeE9Ws+VVGGHsmM9DUO84cla4+hvx8swP1uuEg=",
|
||||
"Expiration": null,
|
||||
"Type": "SharedSecret"
|
||||
}
|
||||
],
|
||||
"Enabled": true,
|
||||
"Scopes": [
|
||||
"openid",
|
||||
"profile",
|
||||
"XAPI.read",
|
||||
"XAPI.write",
|
||||
"XAPI.admin",
|
||||
"manage"
|
||||
],
|
||||
"UserClaims": [
|
||||
"name",
|
||||
"role",
|
||||
"unique_name",
|
||||
"gender",
|
||||
"birthdate",
|
||||
"picture",
|
||||
"email",
|
||||
"phone_number",
|
||||
"email_verified",
|
||||
"phone_number_verified",
|
||||
"is_enabled",
|
||||
"is_banned",
|
||||
"creation_date",
|
||||
"last_login",
|
||||
"given_name",
|
||||
"family_name"
|
||||
]
|
||||
}
|
||||
],
|
||||
"ApiScopes": [
|
||||
{
|
||||
"Name": "IdentityServerApi"
|
||||
},
|
||||
{
|
||||
"Name": "xSaherElmAPI"
|
||||
},
|
||||
{
|
||||
"Name": "XAPI.read",
|
||||
"DisplayName": "Read Access for XAPI"
|
||||
},
|
||||
{
|
||||
"Name": "XAPI.write",
|
||||
"DisplayName": "Write Access for XAPI"
|
||||
},
|
||||
{
|
||||
"Name": "XAPI.admin",
|
||||
"DisplayName": "Admin Access for XAPI"
|
||||
},
|
||||
{
|
||||
"Name": "manage",
|
||||
"DisplayName": "Admin Access for All APIs"
|
||||
}
|
||||
],
|
||||
"Users": [
|
||||
{
|
||||
"Id": "b5713f9f-34f4-49b2-9680-b71e2b2de969",
|
||||
"FirstName": "Hadi",
|
||||
"LastName": "Khazaee Asl",
|
||||
"UserName": "admin",
|
||||
"Email": "hadi_khazaee_asl@yahoo.com",
|
||||
"EmailConfirmed": true,
|
||||
"PhoneNumber": "+989121694056",
|
||||
"PhoneNumberConfirmed": true,
|
||||
"Password": "s@H@1694056",
|
||||
"Role": "admin",
|
||||
"DateOfBirth": "1982-09-17 20:30:00.0000000",
|
||||
"IsEnable": true
|
||||
},
|
||||
{
|
||||
"Id": "83b09f5e-edd2-4e9a-8c5f-c4c129ee9d52",
|
||||
"FirstName": "Hadi",
|
||||
"LastName": "Khazaee Asl",
|
||||
"UserName": "agent",
|
||||
"Email": "hadi.khazaee.asl@gmail.com",
|
||||
"EmailConfirmed": true,
|
||||
"PhoneNumber": "+989101879789",
|
||||
"PhoneNumberConfirmed": true,
|
||||
"Password": "a@A@1694056",
|
||||
"Role": "agent",
|
||||
"DateOfBirth": "1982-09-17 20:30:00.0000000",
|
||||
"IsEnable": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
},
|
||||
"XLogger": {
|
||||
"Enabled": true,
|
||||
"ApplicationName": "xIds",
|
||||
"EnvironmentName": "Production",
|
||||
"MinimumLevel": "Information",
|
||||
"Queue": {
|
||||
"Enabled": true,
|
||||
"Capacity": 10000,
|
||||
"ShutdownTimeoutSeconds": 10
|
||||
},
|
||||
"File": {
|
||||
"Enabled": true,
|
||||
"Directory": "./Logs",
|
||||
"FileName": "xIds-.log",
|
||||
"Format": "Json",
|
||||
"MinimumLevel": "Information",
|
||||
"RetainedFileCountLimit": 30
|
||||
},
|
||||
"Database": {
|
||||
"Enabled": false,
|
||||
"Provider": "Microsoft.Data.Sqlite",
|
||||
"ConnectionString": "Filename=./Db/XLogs.db",
|
||||
"TableName": "XLogs",
|
||||
"AutoCreateTable": true,
|
||||
"MinimumLevel": "Warning"
|
||||
},
|
||||
"Event": {
|
||||
"Enabled": false,
|
||||
"Topic": "application-logs",
|
||||
"Action": "ApplicationLogCreated",
|
||||
"Sender": "xIds",
|
||||
"MinimumLevel": "Error"
|
||||
}
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
|
||||
+5
-14
@@ -7,32 +7,25 @@
|
||||
<PackageId>xSaherElm.xIds</PackageId>
|
||||
<Company>SaherElm IT Center</Company>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
|
||||
<Description>
|
||||
this project is an Identity Server for xSaherElm projects which provides Authentication and
|
||||
Authorization of User's.
|
||||
</Description>
|
||||
|
||||
<!-- Icon Definition -->
|
||||
<PackageIcon>icon.png</PackageIcon>
|
||||
|
||||
<!-- Fix Duplicate TargetFramework Issue -->
|
||||
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Icon Handling -->
|
||||
<ItemGroup>
|
||||
<None Include="../../Resources/Images/favicon.png" Link="icon.png" Pack="true"
|
||||
PackagePath="\icon.png" />
|
||||
<None Include="../../Resources/Images/favicon.png" Link="icon.png" Pack="true" PackagePath="\icon.png" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Local Dependencies -->
|
||||
<ItemGroup>
|
||||
<!-- <PackageReference Include="xDashboard.xMessageService" Version="1.0.0" />
|
||||
<PackageReference Include="xDashboard.xStorageService" Version="1.0.0" /> -->
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Project Dependencies -->
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Modules\xIdentityHelper\xIdentityHelper.csproj" />
|
||||
@@ -40,7 +33,6 @@
|
||||
<ProjectReference Include="..\Modules\xStorageService\xStorageService.csproj" />
|
||||
<ProjectReference Include="..\Modules\xIdentityService\xIdentityService.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- IdentityServer -->
|
||||
<ItemGroup>
|
||||
<PackageReference Include="IdentityServer4" Version="4.1.1" />
|
||||
@@ -53,10 +45,8 @@
|
||||
<PackageReference Include="IdentityModel.AspNetCore.OAuth2Introspection" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.12" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.2" />
|
||||
<PackageReference Include="IdentityModel.AspNetCore.AccessTokenValidation"
|
||||
Version="1.0.0-preview.3" />
|
||||
<PackageReference Include="IdentityModel.AspNetCore.AccessTokenValidation" Version="1.0.0-preview.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Ef Core -->
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MySql.EntityFrameworkCore" Version="5.0.0" />
|
||||
@@ -72,16 +62,17 @@
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<!-- For XML Documentation Support -->
|
||||
<PropertyGroup>
|
||||
<NoWarn>$(NoWarn);1591</NoWarn>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Create Required Folders -->
|
||||
<Target Name="CreateRequiredFolder" AfterTargets="AfterPublish">
|
||||
<MakeDir Directories="$(PublishDir)wwwroot" Condition="!Exists('$(PublishDir)wwwroot')" />
|
||||
</Target>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Modules\xLoggingService\xLoggingService.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user