mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
2.4 KiB
80 lines
2.4 KiB
// ==========================================================================
|
|
// Squidex Headless CMS
|
|
// ==========================================================================
|
|
// Copyright (c) Squidex UG (haftungsbeschränkt)
|
|
// All rights reserved. Licensed under the MIT license.
|
|
// ==========================================================================
|
|
|
|
namespace Squidex.Config
|
|
{
|
|
public sealed class MyIdentityOptions
|
|
{
|
|
public string AdminEmail { get; set; }
|
|
|
|
public string AdminPassword { get; set; }
|
|
|
|
public string AdminClientId { get; set; }
|
|
|
|
public string AdminClientSecret { get; set; }
|
|
|
|
public string GithubClient { get; set; }
|
|
|
|
public string GithubSecret { get; set; }
|
|
|
|
public string GoogleClient { get; set; }
|
|
|
|
public string GoogleSecret { get; set; }
|
|
|
|
public string MicrosoftClient { get; set; }
|
|
|
|
public string MicrosoftSecret { get; set; }
|
|
|
|
public string OidcName { get; set; }
|
|
|
|
public string OidcClient { get; set; }
|
|
|
|
public string OidcSecret { get; set; }
|
|
|
|
public string OidcAuthority { get; set; }
|
|
|
|
public string AuthorityUrl { get; set; }
|
|
|
|
public string PrivacyUrl { get; set; }
|
|
|
|
public bool RequiresHttps { get; set; }
|
|
|
|
public bool AllowPasswordAuth { get; set; }
|
|
|
|
public bool LockAutomatically { get; set; }
|
|
|
|
public bool IsAdminConfigured()
|
|
{
|
|
return !string.IsNullOrWhiteSpace(AdminEmail) && !string.IsNullOrWhiteSpace(AdminPassword);
|
|
}
|
|
|
|
public bool IsAdminClientConfigured()
|
|
{
|
|
return !string.IsNullOrWhiteSpace(AdminClientId) && !string.IsNullOrWhiteSpace(AdminClientSecret);
|
|
}
|
|
|
|
public bool IsOidcConfigured()
|
|
{
|
|
return !string.IsNullOrWhiteSpace(OidcAuthority) && !string.IsNullOrWhiteSpace(OidcClient) && !string.IsNullOrWhiteSpace(OidcSecret);
|
|
}
|
|
|
|
public bool IsGithubAuthConfigured()
|
|
{
|
|
return !string.IsNullOrWhiteSpace(GithubClient) && !string.IsNullOrWhiteSpace(GithubSecret);
|
|
}
|
|
|
|
public bool IsGoogleAuthConfigured()
|
|
{
|
|
return !string.IsNullOrWhiteSpace(GoogleClient) && !string.IsNullOrWhiteSpace(GoogleSecret);
|
|
}
|
|
|
|
public bool IsMicrosoftAuthConfigured()
|
|
{
|
|
return !string.IsNullOrWhiteSpace(MicrosoftClient) && !string.IsNullOrWhiteSpace(MicrosoftSecret);
|
|
}
|
|
}
|
|
}
|
|
|