Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lishisangzi/egg-keystone
Egg plugin OpenStack Keystone Token Service
https://github.com/lishisangzi/egg-keystone
egg-plugin eggjs openstack openstack-keystone
Last synced: 5 days ago
JSON representation
Egg plugin OpenStack Keystone Token Service
- Host: GitHub
- URL: https://github.com/lishisangzi/egg-keystone
- Owner: LiShiSangZi
- License: mit
- Created: 2017-06-19T23:22:40.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-20T00:50:56.000Z (over 7 years ago)
- Last Synced: 2024-12-17T10:05:05.589Z (about 1 month ago)
- Topics: egg-plugin, eggjs, openstack, openstack-keystone
- Language: JavaScript
- Size: 5.86 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# egg-keystone
This is a egg plugin for fetching keystone token according to the default user/password/project/domain according to the configuration.
To use this configuration, you need to make sure you also have a memcached to save the keystone token temporality. Because we don't want to generate a token everytime you need it.
## Install
Please make sure node 7.9.0 or above is install before you start.```
$ npm i egg-keystone --save
```## Usage
```javascript
// {app_root}/config/plugin.js
exports.keystone = {
enable: true,
package: 'egg-keystone'
};
exports.memcached = {
enable: true,
package: 'egg-memcached'
};
```## Configuration
```javascript
// {app_root}/config/config.default.js
exports.memcached = {
"client": {
"hosts": ['10.0.1.1:11211'], // The memcached cluster list.
}
};exports.keystone = {
"url": "http://10.0.1.1:35357/v3", // Keystone endpoint.
"username": "admin", // Keystone admin user.
"userId": "732407c2ee4f4f99ac6639b386c299c0", // Keystone admin user id.
"password": "password", // Keystone admin password
"projectName": "admin", // Keystone admin user's project name.
"projectId": "cd5f1e02d9ad439abed7760afe0bd70e", // Keystone admin user's project id.
"cachedKey": "temp_token", // The cached key saved in memcached.
};
```This plugin will not require any new token unless the current one is expired.