Closed trtin closed 8 years ago
The default auth backend and secret backend are loaded this way. To use the auth backend, app-id
, you would need to mount it after initializing and unsealing the Vault using the method createAuthMount
.
The inputs could be something like this:
myVault.createAuthMount({
id: 'app-id',
body: {
type: 'app-id'
}
});
The body is the the key value as it is refers to the app-id
backend,
@tintran253 closing this, let us know if you are still having issues.
Hi,
I need to a line code to load api-id authentication apis. Could you help to do it? _.extend(this.endpoints, loadAPISpecs(this, config, 'app-id'));
into function:
function API(config) { if (.isUndefined(config) || .isUndefined(config.get)) { throw new Error('API must be configurations object'); } Endpoint = require('./endpoint')(config);
this.endpoints = {}; this.specs = {};
.extend(this.endpoints, loadAPIDefinitions(config)); // default auth backend .extend(this.endpoints, loadAPISpecs(this, config, 'token')); // default secret backend _.extend(this.endpoints, loadAPISpecs(this, config, 'secret'));
_.extend(this.endpoints, loadAPISpecs(this, config, 'app-id')); }
Thanks,