Express APIs sample using Axioms and @axioms/express-js. Secure your Express APIs using Axioms authentication and authorization.
- Node v10.16.0+
- An Axioms client which can obtain access token after user's authentication and authorization and include obtained access token as bearer in
Authorization
header of all API request sent to Node/Express application server.
Clone this repository,
git clone https://github.com/axioms-io/sample-node-express.git
cd sample-node-express
npm install
Create a .env
file and add following configs (see .sample-env
),
AXIOMS_DOMAIN=<your-axioms-slug>.axioms.io
AXIOMS_AUDIENCE=<your-axioms-resource-identifier>
npm run dev
Postman collection is included in this repository. Import the collection in your Postman, setup environment variables host
(i.e. localhost:5000) and access_token
(you can obtain from your client) and test these APIs.
See documentation for express-js
.
You will need to provide Axioms domain and Axioms audience to complete deployment.