Skip to content

refactor(mcp): replace hand-rolled JWT with jose library#86

Merged
elgorro merged 3 commits intomainfrom
feat/jose-jwt
Mar 6, 2026
Merged

refactor(mcp): replace hand-rolled JWT with jose library#86
elgorro merged 3 commits intomainfrom
feat/jose-jwt

Conversation

@elgorro
Copy link
Owner

@elgorro elgorro commented Mar 6, 2026

Replace custom HMAC-SHA256 signJwt/verifyJwt helpers in provider.ts with jose (SignJWT/jwtVerify), delegating iss/aud validation to the library. Also includes redirect_uri validation in loginHandler and a fail-fast guard requiring MCP_AUTH_ENABLED or MCP_ALLOW_UNAUTHENTICATED for HTTP transport.

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

Description

Brief description of the changes.

Type of change

  • Bug fix
  • New feature
  • Documentation update
  • Refactoring
  • Other (please describe)

Component

  • MCP Server
  • Nextcloud App
  • Documentation
  • CI/CD

Checklist

  • I have tested my changes locally
  • I have added tests for new functionality
  • I have updated the documentation if needed
  • My code follows the project's style guidelines

Related Issues

Fixes #

Screenshots (if applicable)

elgorro and others added 3 commits March 6, 2026 15:49
Replace custom HMAC-SHA256 signJwt/verifyJwt helpers in provider.ts
with jose (SignJWT/jwtVerify), delegating iss/aud validation to the
library. Also includes redirect_uri validation in loginHandler and a
fail-fast guard requiring MCP_AUTH_ENABLED or MCP_ALLOW_UNAUTHENTICATED
for HTTP transport.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@elgorro elgorro merged commit d0a136b into main Mar 6, 2026
3 checks passed
@elgorro elgorro deleted the feat/jose-jwt branch March 6, 2026 14:58
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.

1 participant