Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bredah/wiremock
Examples of how to use
https://github.com/bredah/wiremock
Last synced: about 1 month ago
JSON representation
Examples of how to use
- Host: GitHub
- URL: https://github.com/bredah/wiremock
- Owner: bredah
- Created: 2020-05-19T09:47:47.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-01-16T22:21:34.000Z (about 1 year ago)
- Last Synced: 2024-01-17T05:58:06.373Z (about 1 year ago)
- Language: JavaScript
- Size: 1.38 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# WireMock Examples
## Mock Bearer Auth
The [post-auth-token](wiremock/mappings/post-auth-token.json) has a example of how to obtained the token.
To enable the request to start to check the token, use the code below:
```json
"request": {
"headers": {
"Authorization": {
"matches": "^Bearer.[a-zA-Z0-9]{20}$"
}
}
}
```In the [Postman file](postman/wiremock.postman_collection.json), enable the token with the config below:
![Postman: How to enable the bearer token](img/postman-set-bearer-token.png)