jvcalderon/token-service
Composer 安装命令:
composer create-project jvcalderon/token-service
包简介
A dockerized microservice who provides a REST interface with token's common functionality
README 文档
README
A dockerized microservice who provides a REST interface with token's common functionality.
Installation
You need Composer to install dependencies:
$ composer install #use --no-dev option in a production environment
Now you must up Docker containers by docker-compose. This command will build a PHP container with XDEBUG configuration (recommended for develop purposes):
$ export ENV=dev; docker-compose -f docker-compose.yml -f ./config/docker/${ENV}/docker-compose.yml up --build -d
In a production environment is recommended the following command without XDEBUG config:
$ export ENV=prod; docker-compose up --build -d
Create database schema
Use doctrine binary to create DB schema:
$ php bin/doctrine orm:schema-tool:create
Debugging with XDEBUG:
You must to keep in mind that the Xdebug's default port (9000) has been replaced by 9089 to avoid collision with PHP CGI. Remote host IP is 10.254.254.254 (de facto standard host address alias) so you need to create the alias:
$ ifconfig lo0 alias 10.254.254.254
If you are using MacOS I recommend to read: Docker (Mac) De-facto Standard Host Address Alias
Basic use
Now you can use the REST API to consume the service:
| Route | Method | Params | Description |
| / | POST | - | Create a new token. you can get it by 'Location' response header. This token expires in 14 days of inactivity. |
| /{tokenId} | GET | - | Retrieve the token data in hal+json format and update expiration datetime. |
| /{tokenId} | DELETE | - | Expires the token. |
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-01-22