Skip to content

Make dotnet-user-jwts support custom appsettings json file #56169

@abc-rpg

Description

@abc-rpg

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

I want to be able to use dotnet-user-jwts in a project that does not use appsettings.Development.json for local development. In some cases for instance, it is appsettings.Local.json.

Although it is easy to copy it into another appsettings file, it's an inconvenience since previous data gets overwritten.

Describe the solution you'd like

The current behavior can be overriden by an optional argument.

  • Option 1: An argument to specify appsettings file
dotnet user-jwts create --configurationFile appsettings.Local.json
  • Option 2: An argument to specify environment, then infer the file name (appsettings.{env}.json)
dotnet user-jwts create --environment Local
  • Option 3: Skip writing to the appsettings file, and output the configuration to the console instead, for manual copying.
dotnet user-jwts create --disable-auto-config

I did not think too much about naming, as I would like to see if there is interest in this.

Additional context

There was a very brief mention of the idea of disabling the configuration in the issue here #46239, but in a different context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-commandlinetoolsIncludes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPIfeature-userjwtsThe `dotnet user-jwts` CLI tool

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions