diff --git a/plugins/auth-bearer/README.md b/plugins/auth-bearer/README.md new file mode 100644 index 00000000..e9366792 --- /dev/null +++ b/plugins/auth-bearer/README.md @@ -0,0 +1,47 @@ +# Bearer Token Authentication Plugin + +A Bearer Token authentication plugin for Yaak that +implements [RFC 6750](https://datatracker.ietf.org/doc/html/rfc6750), enabling secure API +access using tokens, API keys, and other bearer credentials. + +![Screenshot of bearer auth UI](screenshot.png) + +## Overview + +This plugin provides Bearer Token authentication support for your API requests in Yaak. +Bearer Token authentication is widely used in modern APIs, especially those following REST +principles and OAuth 2.0 standards. It's the preferred method for APIs that issue access +tokens, API keys, or other bearer credentials. + +## How Bearer Token Authentication Works + +Bearer Token authentication sends your token in the `Authorization` header with each +request using the Bearer scheme: + +``` +Authorization: Bearer +``` + +The token is transmitted as-is without any additional encoding, making it simple and +efficient for API authentication. + +## Configuration + +The plugin requires only one field: + +- **Token**: Your bearer token, access token, API key, or other credential +- **Prefix**: The prefix to use for the Authorization header, which will be of the + format " " + +## Usage + +1. Configure the request, folder, or workspace to use Bearer Authentication +2. Enter the token and optional prefix in the authentication configuration +3. The plugin will automatically add the proper `Authorization` header to your requests + +## Troubleshooting + +- **401 Unauthorized**: Verify your token is valid and not expired +- **403 Forbidden**: Check if your token has the necessary permissions/scopes +- **Invalid Token Format**: Ensure you're using the complete token without truncation +- **Token Expiration**: Refresh or regenerate expired tokens diff --git a/plugins/auth-bearer/package.json b/plugins/auth-bearer/package.json index d0bd131b..8076ff95 100644 --- a/plugins/auth-bearer/package.json +++ b/plugins/auth-bearer/package.json @@ -2,6 +2,11 @@ "name": "@yaak/auth-bearer", "displayName": "Bearer Authentication", "description": "Authenticate requests using bearer authentication", + "repository": { + "type": "git", + "url": "https://github.com/mountain-loop/yaak.git", + "directory": "plugins/auth-bearer" + }, "private": true, "version": "0.1.0", "scripts": { diff --git a/plugins/auth-bearer/screenshot.png b/plugins/auth-bearer/screenshot.png new file mode 100644 index 00000000..db9aaa0c Binary files /dev/null and b/plugins/auth-bearer/screenshot.png differ