Document authentication system added in PR #24 #25
+327
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR #24 added JWT-based authentication with OAuth2 client credentials flow, scope-based permissions, and client management endpoints. This updates the README to document the new authentication system.
Configuration
FASTPUBSUB_AUTH_ENABLED(default:false),FASTPUBSUB_AUTH_SECRET_KEY,FASTPUBSUB_AUTH_ALGORITHM, andFASTPUBSUB_AUTH_ACCESS_TOKEN_EXPIRE_MINUTESenvironment variablesCLI Commands
generate_secret_key- Generates cryptographically secure secret for JWT signingcreate_client <name> <scopes> <is_active>- Creates OAuth client with specified permissionsScopes
Global scopes:
*(admin),topics:{create,read,delete,publish},subscriptions:{create,read,delete,consume},clients:{create,update,read,delete}Object-specific scopes:
topics:publish:my-topic-idrestricts publish to single topicAPI Reference
/oauth/tokenwithclient_id/client_secretreturns JWT access token/clientsendpoint (create, get, list, update, delete)Authorization: Bearer <token>header on authenticated requeststoken_version, invalidating existing tokensExamples
Troubleshooting
FASTPUBSUB_AUTH_ENABLED=trueon server, token not expired (30min default), client activetopics:publishortopics:publish:specific-topic)Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.