Categorygithub.com/codepawfect/jwt-generator
modulepackage
0.0.0-20240930121142-0f0e01b02156
Repository: https://github.com/codepawfect/jwt-generator.git
Documentation: pkg.go.dev

# README

JWT Generator

This Go application generates unsigned JWTs based on command-line arguments. It allows you to pass various claims as arguments and handles both single values and lists for claims.

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/jwt-generator.git
    
    
  2. Navigate to the project directory:

    cd jwt-generator
    
    
  3. Build the application:

    go build -o jwt-generator
    

This will create an executable named jwt-generator in your project directory.

Usage

The application accepts command-line arguments to specify claims for the JWT. Claims can be single values or lists. The general syntax is:

jwt-generator --key value --key -list value1,value2,...

Arguments

--key value: Single key-value pair where key is the claim name and value is its value. --key -list value1,value2,...: For claims that should be treated as lists, use the -list flag followed by comma-separated values.

Example

Generate a JWT with a single value for companyTag and a list for roles:

jwt-generator --organisation BMW --userFullName Max Mustermann  --roles -list admin,manager

License

This project is licensed under the MIT License - see the LICENSE file for details.

# Packages

No description provided by the author