mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 03:14:03 +03:00
Added base and default SSO Adapter
no-issue
This commit is contained in:
parent
fb942af1db
commit
d0bb8c3333
8
core/server/adapters/sso/Base.js
Normal file
8
core/server/adapters/sso/Base.js
Normal file
@ -0,0 +1,8 @@
|
||||
module.exports = class SSOBase {
|
||||
constructor() {
|
||||
Object.defineProperty(this, 'requiredFns', {
|
||||
value: ['getRequestCredentials', 'getIdentityFromCredentials', 'getUserForIdentity'],
|
||||
writable: false
|
||||
});
|
||||
}
|
||||
};
|
19
core/server/adapters/sso/Default.js
Normal file
19
core/server/adapters/sso/Default.js
Normal 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;
|
||||
}
|
||||
};
|
@ -16,6 +16,11 @@
|
||||
"paths": {
|
||||
"contentPath": "content/"
|
||||
},
|
||||
"adapters": {
|
||||
"sso": {
|
||||
"active": "Default"
|
||||
}
|
||||
},
|
||||
"storage": {
|
||||
"active": "LocalFileStorage"
|
||||
},
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user