Skip to content

Commit

Permalink
New schema for latest authman
Browse files Browse the repository at this point in the history
  • Loading branch information
markwylde committed Nov 21, 2023
1 parent 25d59e7 commit 590154d
Showing 1 changed file with 44 additions and 9 deletions.
53 changes: 44 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ const initialConfig = {
tableName: 'users',
usernameProperty: 'email'
},
registration: {
enabled: false
},
passwordReset: {
enabled: false
},
loginTitle: 'Example Login Title'
};

Expand All @@ -16,6 +22,17 @@ function generateConfigSchema ({ config }) {
description: 'Custom settings for the extension',
type: 'object',
properties: {
domain: {
title: 'Domain',
type: 'string',
readOnly: true
},
oidcConfigUrl: {
title: 'OpenID Connect Configuration',
type: 'string',
readOnly: true
},

loginTitle: {
title: 'Login Page Title',
type: 'string'
Expand All @@ -34,15 +51,15 @@ function generateConfigSchema ({ config }) {
}
}
},
domain: {
title: 'Domain',
type: 'string',
readOnly: true
},
oidcConfigUrl: {
title: 'OpenID Connect Configuration',
type: 'string',
readOnly: true
passwordReset: {
title: 'Password Reset',
type: 'object',
properties: {
enabled: {
title: 'Enabled',
type: 'boolean'
}
}
}
}
},
Expand Down Expand Up @@ -72,6 +89,22 @@ function generateConfigSchema ({ config }) {
}
}
}
},
{
title: 'Registration',
description: 'Manage the registration abilities',
type: 'object',
properties: {
registration: {
type: 'object',
properties: {
enabled: {
title: 'Registration Enabled',
type: 'boolean'
}
}
}
}
}
];
}
Expand Down Expand Up @@ -253,6 +286,8 @@ async function onChange ({ account, extension, config, tokens }) {
token: tokens.general,
title: config.loginTitle,
clients: config.clients,
registration: config.registration,
passwordReset: config.passwordReset,
usersUrl: `${parutUrl}/v1/accounts/${account.id}/users`,
properties: {
username: 'email',
Expand Down

0 comments on commit 590154d

Please sign in to comment.