mirror of
https://github.com/plankanban/planka.git
synced 2025-07-24 15:49:46 +02:00
feat: OIDC with PKCE flow (#491)
This commit is contained in:
parent
9333ef562e
commit
107cb85ba2
24 changed files with 805 additions and 22 deletions
40
server/api/models/IdentityProviderUser.js
Normal file
40
server/api/models/IdentityProviderUser.js
Normal file
|
@ -0,0 +1,40 @@
|
|||
/**
|
||||
* ProjectManager.js
|
||||
*
|
||||
* @description :: A model definition represents a database table/collection.
|
||||
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
attributes: {
|
||||
issuer: {
|
||||
type: 'string',
|
||||
isNotEmptyString: true,
|
||||
allowNull: true,
|
||||
},
|
||||
sub: {
|
||||
type: 'string',
|
||||
isNotEmptyString: true,
|
||||
allowNull: true,
|
||||
},
|
||||
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗
|
||||
// ╠═╝╠╦╝║║║║║ ║ ║╚╗╔╝║╣ ╚═╗
|
||||
// ╩ ╩╚═╩╩ ╩╩ ╩ ╩ ╚╝ ╚═╝╚═╝
|
||||
|
||||
// ╔═╗╔╦╗╔╗ ╔═╗╔╦╗╔═╗
|
||||
// ║╣ ║║║╠╩╗║╣ ║║╚═╗
|
||||
// ╚═╝╩ ╩╚═╝╚═╝═╩╝╚═╝
|
||||
|
||||
// ╔═╗╔═╗╔═╗╔═╗╔═╗╦╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
|
||||
// ╠═╣╚═╗╚═╗║ ║║ ║╠═╣ ║ ║║ ║║║║╚═╗
|
||||
// ╩ ╩╚═╝╚═╝╚═╝╚═╝╩╩ ╩ ╩ ╩╚═╝╝╚╝╚═╝
|
||||
|
||||
userId: {
|
||||
model: 'User',
|
||||
required: true,
|
||||
columnName: 'user_id',
|
||||
},
|
||||
},
|
||||
|
||||
tableName: 'identity_provider_user',
|
||||
};
|
|
@ -18,7 +18,6 @@ module.exports = {
|
|||
},
|
||||
password: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
},
|
||||
isAdmin: {
|
||||
type: 'boolean',
|
||||
|
@ -68,6 +67,10 @@ module.exports = {
|
|||
type: 'ref',
|
||||
columnName: 'password_changed_at',
|
||||
},
|
||||
locked: {
|
||||
type: 'boolean',
|
||||
columnName: 'locked',
|
||||
},
|
||||
|
||||
// ╔═╗╔╦╗╔╗ ╔═╗╔╦╗╔═╗
|
||||
// ║╣ ║║║╠╩╗║╣ ║║╚═╗
|
||||
|
@ -97,6 +100,10 @@ module.exports = {
|
|||
via: 'userId',
|
||||
through: 'CardMembership',
|
||||
},
|
||||
identityProviders: {
|
||||
collection: 'IdentityProviderUser',
|
||||
via: 'userId',
|
||||
},
|
||||
},
|
||||
|
||||
tableName: 'user_account',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue