Skip to content

Conversation

@EHadoux
Copy link
Contributor

@EHadoux EHadoux commented Mar 13, 2025

Adds the ability to self-sign tokens. Also adds a little helper to decode the token to inspect its content.

@EHadoux EHadoux requested a review from Copilot March 13, 2025 10:29
@EHadoux EHadoux self-assigned this Mar 13, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds support for self-managed token signing and decoding, enabling users with their own SSO systems to self-sign tokens. Key changes include:

  • Updating the README with documentation and usage examples for self-signing tokens.
  • Introducing a SelfManagedSigner class and a decode_self_signed_jwt helper in scribeauth.py.
  • Adding tests for self-signed token generation and decoding, and updating dependencies in pyproject.toml.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
README.md Added documentation and examples for self-signing tokens.
scribeauth/scribeauth.py Added SelfManagedSigner implementation and token decoding helper function.
tests/test_scribeauth.py Added new tests for self-signed token functionality and updated test helpers.
pyproject.toml Included pyjwt as a dependency for token signing.
scribeauth/init.py Exported SelfManagedSigner and decode_self_signed_jwt for public API usage.
Comments suppressed due to low confidence (2)

scribeauth/scribeauth.py:369

  • A duplicate definition of SelfManagedSigner appears to be introduced. Ensure that only one implementation exists to avoid conflicts.
@dataclass

scribeauth/scribeauth.py:385

  • The docstring is misleading; consider updating it to 'Signs a JWT payload using the private key' or similar to accurately describe the functionality.
        "Signs the private key with the private key."

@EHadoux EHadoux requested a review from alexbostock March 13, 2025 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants