Skip to content

Add interactive JWT demo showcasing JWT.NET library integration with Ivy#71

Closed
nielsbosma with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-25
Closed

Add interactive JWT demo showcasing JWT.NET library integration with Ivy#71
nielsbosma with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-25

Conversation

Copilot AI commented Sep 23, 2025

Copy link
Copy Markdown

This PR adds a comprehensive JWT (JSON Web Token) demo application that showcases the integration of the JWT.NET library with the Ivy interactive web framework.

Features

The demo provides a complete JWT workflow with an intuitive web interface:

🔑 Token Generation

  • Interactive form to create JWT tokens with custom claims
  • Supports username, email, and role selection (User/Admin/Moderator)
  • Includes standard JWT claims: iat (issued at), exp (expires), iss (issuer), aud (audience)
  • Uses HMAC SHA-256 algorithm for secure token signing

🔍 Token Operations

  • Token Validation: Verifies JWT signatures and decodes payload with full verification
  • Token Decoding: Inspects token contents without signature verification (useful for debugging)
  • Claims Extraction: Formats and displays specific claims with human-readable timestamps

📋 Interactive Results

  • JSON syntax highlighting with line numbers
  • Copy-to-clipboard functionality for easy token sharing
  • Real-time error handling with descriptive messages

Technical Implementation

  • Built using the JWT.NET library (v10.1.1) with the recommended JWT Builder pattern
  • Targets .NET 9.0 for compatibility with the latest Ivy framework
  • Uses proper JWT validation with JwtBuilder.Create() for secure token operations
  • Implements clean separation between token generation, validation, and decoding operations

Educational Value

The demo includes comprehensive documentation explaining:

  • JWT concepts and use cases
  • Security best practices for production applications
  • Links to jwt.io and the JWT.NET library documentation
  • Clear examples of each JWT operation

Security Notes

The demo uses a hardcoded secret key for demonstration purposes and includes prominent warnings about using proper secrets management in production applications.

Fixes #25.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • aka.ms
    • Triggering command: curl -I -sSL --retry 5 --retry-delay 2 --connect-timeout 15 REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI commented Sep 23, 2025

Copy link
Copy Markdown
Author

@nielsbosma 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

@nielsbosma nielsbosma closed this Sep 23, 2025
Copilot AI changed the title [WIP] Create Ivy Example for NuGet JWT Add interactive JWT demo showcasing JWT.NET library integration with Ivy Sep 23, 2025
Copilot AI requested a review from nielsbosma September 23, 2025 20:08
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.

Create Ivy Example for NuGet JWT

2 participants