fix: move displayName into auth integrations

This commit is contained in:
Wyatt Johnson
2018-07-23 13:14:34 -06:00
parent 13d293b9aa
commit 4b5c7c1c7b
4 changed files with 16 additions and 22 deletions
+10 -5
View File
@@ -58,16 +58,24 @@ export interface AuthIntegration {
enabled: boolean;
}
export interface DisplayNameAuthIntegration {
displayNameEnable: boolean;
}
// SSOAuthIntegration is an AuthIntegration that provides a secret to the admins
// of a tenant, where they can sign a SSO payload with it to provide to the
// embed to allow single sign on.
export interface SSOAuthIntegration extends AuthIntegration {
export interface SSOAuthIntegration
extends AuthIntegration,
DisplayNameAuthIntegration {
key: string;
}
// OIDCAuthIntegration provides a way to store Open ID Connect credentials. This
// will be used in the admin to provide staff logins for users.
export interface OIDCAuthIntegration extends AuthIntegration {
export interface OIDCAuthIntegration
extends AuthIntegration,
DisplayNameAuthIntegration {
clientID: string;
clientSecret: string;
issuer: string;
@@ -108,7 +116,6 @@ export interface AuthIntegrations {
export interface Auth {
integrations: AuthIntegrations;
displayNameEnable: boolean;
}
// Tenant definition.
@@ -194,8 +201,6 @@ export async function createTenant(db: Db, input: CreateTenantInput) {
banned: [],
},
auth: {
// Disable the displayName by default.
displayNameEnable: false,
integrations: {
local: {
enabled: true,