Skip to content

Commit

Permalink
Readme update (#2) (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
NickRimmer authored Jul 2, 2023
1 parent 4b68c76 commit 6fe269c
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 13 deletions.
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
If you like this plugin, [leave it a :star: on Github!](https://github.com/NickRimmer/insomnia-plugin-oa2-mate)

# About
<img src="npm/content/oa2-mate-icon.jpg" alt="Just a mate" width="200" height="200">
<img src="npm/content/oa2-mate-icon-medium.jpg" alt="Just a mate" width="200" height="200">

Welcome aboard the 'oAuth 2 Mate' express! 🚀

Expand All @@ -12,26 +12,30 @@ Your passport to simpler authorization is just a click away. Happy coding! 🎉
## How to use
This is just one of examples (;

1. Install the plugin from [Insomnia plugin page]([Title](https://insomnia.rest/plugins/insomnia-plugin-oa2-mate)) first you it is not installed yet
### Step 1
Install the plugin from [Insomnia plugin page]([Title](https://insomnia.rest/plugins/insomnia-plugin-oa2-mate)) first if it is not installed yet.

2. Add any request (even without endpoint) where we can configure oAuth2 and retrieve the token as usual. Click refresh to get a new token.
### Step 2
Add any request (even without endpoint) where we can configure oAuth2 and retrieve the token as usual. Click refresh to get a new token.

<img src="npm/content/how-to-1.jpg" alt="Step 1">
<img src="npm/content/how-to-1.jpg" alt="Step 2">

3. Open your environment settings and add default header there for authorization
### Step 3
Open your environment settings and add default header there for authorization. You can press `ctrl+space` and select `oa2_mate` from the list.

```json
{
"DEFAULT_HEADERS": {
"Authorization": "Bearer {% oa2_mate %}"
"Authorization": "Bearer {% oa2_mate %}"
}
}
```
<img src="npm/content/how-to-2.jpg" alt="Step 2">
<img src="npm/content/how-to-2.jpg" alt="Step 3">

4. Open some request, make sure there is no authentication configured and run it. Default headers will insert authorization one with value provided by plugin
### Step 4
Open your request, make sure there is no authentication configured and run it. Default headers will insert authorization one with value provided by plugin

<img src="npm/content/how-to-3.jpg" alt="Step 2">
<img src="npm/content/how-to-3.jpg" alt="Step 5">

# How to contribute

Expand Down
28 changes: 27 additions & 1 deletion npm/content/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
If you like this plugin, [leave it a :star: on Github!](https://github.com/NickRimmer/insomnia-plugin-oa2-mate)

# About
<img src="npm/content/oa2-mate-icon.jpg" alt="Just a mate" width="200" height="200">
<img src="npm/content/oa2-mate-icon-medium.jpg" alt="Just a mate" width="200" height="200">

Welcome aboard the 'oAuth 2 Mate' express! 🚀

Expand All @@ -12,6 +12,32 @@ Your passport to simpler authorization is just a click away. Happy coding! 🎉
## How to use
This is just one of examples (;

### Step 1
Install the plugin from [Insomnia plugin page]([Title](https://insomnia.rest/plugins/insomnia-plugin-oa2-mate)) first if it is not installed yet.

### Step 2
Add any request (even without endpoint) where we can configure oAuth2 and retrieve the token as usual. Click refresh to get a new token.

<img src="npm/content/how-to-1.jpg" alt="Step 2">

### Step 3
Open your environment settings and add default header there for authorization. You can press `ctrl+space` and select `oa2_mate` from the list.

```json
{
"DEFAULT_HEADERS": {
"Authorization": "Bearer {% oa2_mate %}"
}
}
```
<img src="npm/content/how-to-2.jpg" alt="Step 3">

### Step 4
Open your request, make sure there is no authentication configured and run it. Default headers will insert authorization one with value provided by plugin

<img src="npm/content/how-to-3.jpg" alt="Step 5">
This is just one of examples (;

1. Install the plugin from [Insomnia plugin page]([Title](https://insomnia.rest/plugins/insomnia-plugin-oa2-mate)) first you it is not installed yet

2. Add any request (even without endpoint) where we can configure oAuth2 and retrieve the token as usual. Click refresh to get a new token.
Expand Down
Binary file added npm/content/oa2-mate-icon-medium.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added npm/content/oa2-mate-icon-small.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"description": "Always ready with the latest oAuth 2 token as template variable. Have a stress-free coding/testing!",
"unlisted": true,
"images": {
"icon": "oa2-mate-icon.jpg"
"icon": "oa2-mate-icon-small.jpg"
},
"publisher": {
"name": "Nick Rimmer",
Expand All @@ -27,8 +27,11 @@
"url": "https://github.com/NickRimmer/insomnia-plugin-oa2-mate/issues"
},
"scripts": {
"publish": "node npm/generate-package.js && copyfiles -u 2 ./npm/content/* ./dist/ && copyfiles -u 1 ./src/* ./dist/ && cd dist && npm publish",
"publish-dry": "node npm/generate-package.js && copyfiles -u 2 ./npm/content/* ./dist/ && copyfiles -u 1 ./src/* ./dist/ && cd dist && npm publish --dry-run"
"build": "node npm/generate-package.js && copyfiles -u 2 ./npm/content/* ./dist/ && copyfiles -u 1 ./src/* ./dist/",
"publish": "npm run build && cd dist && npm publish",
"publish-dry": "npm run build && cd dist && npm publish --dry-run",
"install": "copyfiles -u 1 ./dist/* %appdata%/insomnia/plugins/insomnia-plugin-oa2-mate",
"install-dev": "copyfiles -u 1 ./dist/* %appdata%/insomnia-app/plugins/insomnia-plugin-oa2-mate"
},
"devDependencies": {
"copyfiles": "^2.4.1",
Expand Down

0 comments on commit 6fe269c

Please sign in to comment.