Skip to content

Commit

Permalink
Add clients config
Browse files Browse the repository at this point in the history
  • Loading branch information
markwylde committed Nov 16, 2023
1 parent 3bf2419 commit 25d59e7
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ function generateConfigSchema ({ config }) {
type: 'string'
},
usersMapping: {
title: 'Users Data Mapping',
type: 'object',
properties: {
tableName: {
Expand All @@ -44,6 +45,33 @@ function generateConfigSchema ({ config }) {
readOnly: true
}
}
},
{
title: 'Clients',
description: 'Manage your external OIDC Clients',
type: 'object',
properties: {
clients: {
type: 'array',
items: {
type: 'object',
properties: {
id: {
title: 'Client ID',
type: 'string'
},
redirectUris: {
title: 'Allowed Redirect Urls',
type: 'array',
items: {
type: 'string'
}
}
},
required: ['id', 'redirectUris']
}
}
}
}
];
}
Expand Down Expand Up @@ -92,6 +120,10 @@ function generateUserTable () {
title: 'Password',
type: 'string',
minLength: 6
},
loginEnabled: {
title: 'Login Enabled',
type: 'boolean'
}
},
required: [
Expand Down Expand Up @@ -220,6 +252,7 @@ async function onChange ({ account, extension, config, tokens }) {
accountId: account.id,
token: tokens.general,
title: config.loginTitle,
clients: config.clients,
usersUrl: `${parutUrl}/v1/accounts/${account.id}/users`,
properties: {
username: 'email',
Expand Down

0 comments on commit 25d59e7

Please sign in to comment.