|
2 weeks ago | |
---|---|---|
.gitignore | 2 weeks ago | |
Dockerfile | 2 weeks ago | |
LICENSE | 2 weeks ago | |
README.md | 2 weeks ago | |
config.example.json | 2 weeks ago | |
docker-compose-example.yml | 2 weeks ago | |
index.js | 2 weeks ago | |
package.json | 2 weeks ago | |
yarn.lock | 2 weeks ago |
authspok is an API proxy by Alles for handling requests between microservices
The config.json
file can contain 3 parts: port
, services
and clients
.
port
is optional and defaults to 8080. It is the port that authspok listens on.services
are the service names and the URLs that requests should be proxied to. For example, if there is {"users": "http://localhost:8081"}
, then https://authspok.example.com/users/example
goes to http://localhost:8081/example
clients
specified credentials and which services they have access to. The client secret is specified in secret
and access
is an array of service names that the client can access.Use HTTP Basic Auth to access services through authspok. A client can only access the services specified in the config file.
authspok can be used with Docker and Docker Compose. Copy the docker-compose-example.yml
file to docker-compose.yml
and change the port to the one you want to use.