Added base and default SSO Adapter

no-issue
This commit is contained in:
Fabien O'Carroll 2020-04-05 18:52:47 +02:00
parent fb942af1db
commit d0bb8c3333
4 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,8 @@
module.exports = class SSOBase {
constructor() {
Object.defineProperty(this, 'requiredFns', {
value: ['getRequestCredentials', 'getIdentityFromCredentials', 'getUserForIdentity'],
writable: false
});
}
};

View File

@ -0,0 +1,19 @@
const Base = require('./Base');
module.exports = class DefaultSSOAdapter extends Base {
constructor() {
super();
}
async getRequestCredentials() {
return null;
}
async getIdentityFromCredentials() {
return null;
}
async getUserForIdentity() {
return null;
}
};

View File

@ -16,6 +16,11 @@
"paths": {
"contentPath": "content/"
},
"adapters": {
"sso": {
"active": "Default"
}
},
"storage": {
"active": "LocalFileStorage"
},

View File

@ -13,6 +13,7 @@ const adapterManager = new AdapterManager({
adapterManager.registerAdapter('storage', require('ghost-storage-base'));
adapterManager.registerAdapter('scheduling', require('../../adapters/scheduling/SchedulingBase'));
adapterManager.registerAdapter('sso', require('../../adapters/sso/Base'));
module.exports = {
getAdapter(adapterType) {