CoreID/app/services/saml.service.js

23 lines
532 B
JavaScript
Raw Permalink Normal View History

2020-05-04 01:16:54 +00:00
const { Service } = require('flitter-di')
const fs = require('fs').promises
class SamlService extends Service {
static get services() {
return [...super.services, 'configs']
}
config() {
return this.configs.get('saml')
}
async private_key() {
return String(await fs.readFile(this.configs.get('saml.cert_file.private')))
}
async public_cert() {
return String(await fs.readFile(this.configs.get('saml.cert_file.public')))
}
}
module.exports = exports = SamlService