Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ public class AddCustomLoginValidator : AbstractValidator<AddCustomLoginDto>
{
public AddCustomLoginValidator()
{
RuleFor(CustomLogin => CustomLogin.Name).Required().ChineseLetterNumber().MinimumLength(2).MaximumLength(50);
RuleFor(CustomLogin => CustomLogin.Title).Required().ChineseLetterNumber().MinimumLength(2).MaximumLength(50);
RuleFor(CustomLogin => CustomLogin.Name).Required().MinimumLength(2).MaximumLength(50);
RuleFor(CustomLogin => CustomLogin.Title).Required().MinimumLength(2).MaximumLength(50);
RuleFor(CustomLogin => CustomLogin.ClientId).Required();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,18 @@ public static async Task AddSchedulerJobAsync(this IServiceCollection services)
{
using IServiceScope scope = services.BuildServiceProvider().CreateScope();
var serviceProvider = scope.ServiceProvider;
await serviceProvider.SafeExcuteAsync(AddSyncUserAutoCompleteJobAsync);
await serviceProvider.SafeExcuteAsync(AddSyncUserRedisJobAsync);
await serviceProvider.SafeExcuteAsync(AddSyncOidcRedisJobAsync);
await serviceProvider.SafeExcuteAsync(AddSyncPermissionRedisJobAsync);
await serviceProvider.SafeExcuteAsync(AddSyncLdapUserJobAsync);
try
{
await serviceProvider.SafeExcuteAsync(AddSyncUserAutoCompleteJobAsync);
await serviceProvider.SafeExcuteAsync(AddSyncUserRedisJobAsync);
await serviceProvider.SafeExcuteAsync(AddSyncOidcRedisJobAsync);
await serviceProvider.SafeExcuteAsync(AddSyncPermissionRedisJobAsync);
await serviceProvider.SafeExcuteAsync(AddSyncLdapUserJobAsync);
}
catch
{
// ignored
}
}

static async Task CreateAndRunAsync(this IServiceProvider serviceProvider, UpsertSchedulerJobRequest upsertSchedulerJobRequest)
Expand Down
10 changes: 2 additions & 8 deletions src/Services/Masa.Auth.Service.Admin/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,8 @@
var defaultStackConfig = builder.Configuration.GetDefaultStackConfig();
var webId = defaultStackConfig.GetWebId(project);
var ssoDomain = defaultStackConfig.GetSsoDomain();
var init = true;
#if DEBUG
init = false;
#endif
await builder.Services.AddMasaStackConfigAsync(project, MasaStackApp.Service, init, null, callerAction =>
{
callerAction.UseClientAuthentication(webId, ssoDomain);
});

await builder.Services.AddMasaStackConfigAsync(project, MasaStackApp.Service);

var masaStackConfig = builder.Services.GetMasaStackConfig();
var publicConfiguration = builder.Services.GetMasaConfiguration().ConfigurationApi.GetPublic();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
"MASA_NAMESPACE": "masastack",
"MASA_CLUSTER": "Default",
"OTLP_URL": "https://otel-collector.masastack:9013",
"REDIS": "{\"RedisHost\": \"10.130.0.19\", \"RedisPort\": 2135, \"RedisDb\": 3,\"RedisPassword\": \"Hzss@123\"}",
"REDIS": "{\"RedisHost\": \"10.130.0.19\", \"RedisPort\": 2135, \"RedisDb\": 2,\"RedisPassword\": \"Hzss@123\"}",
"CONNECTIONSTRING": "{\"Server\": \"10.130.0.19\", \"Port\": 3815,\"Database\":\"pm-dev\",\"UserId\": \"ss\",\"Password\":\"Lsd@2023\",\"DbType\":\"PostgreSql\"}",
"MASA_STACK": "[{\"id\":\"pm\",\"service\":{\"id\":\"pm-service-dev\",\"domain\":\"http://pm-service-dev.masastack.com\"},\"web\":{\"id\":\"pm-web-dev\",\"domain\":\"https://pm-dev.masastack.com\"}},{\"id\":\"dcc\",\"service\":{\"id\":\"dcc-service-dev\",\"domain\":\"http://dcc-service-dev.masastack.com\"},\"web\":{\"id\":\"dcc-web-dev\",\"domain\":\"https://dcc-dev.masastack.com\"}},{\"id\":\"tsc\",\"service\":{\"id\":\"tsc-service-dev\",\"domain\":\"http://tsc-service-dev.masastack.com\"},\"web\":{\"id\":\"tsc-web-dev\",\"domain\":\"https://tsc-dev.masastack.com\"}},{\"id\":\"alert\",\"service\":{\"id\":\"alert-service-dev\",\"domain\":\"http://alert-service-dev.masastack.com\"},\"web\":{\"id\":\"alert-web-dev\",\"domain\":\"https://alert-dev.masastack.com\"}},{\"id\":\"scheduler\",\"service\":{\"id\":\"scheduler-service-dev\",\"domain\":\"http://scheduler-service-dev.masastack.com\"},\"worker\":{\"id\":\"scheduler-worker-dev\",\"domain\":\"http://scheduler-worker-dev.masastack.com\"},\"web\":{\"id\":\"scheduler-web-dev\",\"domain\":\"https://scheduler-dev.masastack.com\"}},{\"id\":\"mc\",\"service\":{\"id\":\"mc-service-dev\",\"domain\":\"http://mc-service-dev.masastack.com\"},\"web\":{\"id\":\"mc-web-dev\",\"domain\":\"https://mc-dev.masastack.com\"}},{\"id\":\"auth\",\"service\":{\"id\":\"auth-service-dev\",\"domain\":\"http://auth-service-dev.masastack.com\"},\"web\":{\"id\":\"auth-web-dev\",\"domain\":\"https://auth-dev.masastack.com\"},\"sso\":{\"id\":\"auth-sso-dev\",\"domain\":\"https://auth-sso-dev.masastack.com\"}}]",
"ELASTIC": "{\"Nodes\": [\"http://es-ydy-new.lonsid.cn:9200\"],\"Index\": \"auth_user_development\"}",
"MASA_ENVIRONMENT": "Development",
"MASA_ENVIRONMENT": "Test",
"ADMIN_PWD": "admin123",
"DCC_SECRET": "masastack.com",
"SUFFIX_IDENTITY": "dev"
"SUFFIX_IDENTITY": "test"
},
"applicationUrl": "https://localhost:18102;http://localhost:18002",
"dotnetRunMessages": true
Expand Down