Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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)