94 references to Resources
dotnet-user-jwts (92)
artifacts\obj\dotnet-user-jwts\Release\net11.0\Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Resources.cs (1)
10internal static global::System.Resources.ResourceManager ResourceManager => s_resourceManager ?? (s_resourceManager = new global::System.Resources.ResourceManager(typeof(Resources)));
Commands\ClearCommand.cs (7)
15cmd.Description = Resources.ClearCommand_Description; 19Resources.ClearCommand_ForceOption_Description, 24Resources.CreateCommand_appsettingsFileOption_Description, 53reporter.Output(Resources.FormatClearCommand_NoJwtsRemoved(project)); 59reporter.Output(Resources.FormatClearCommand_Permission(count, project)); 63reporter.Output(Resources.ClearCommand_Canceled); 77reporter.Output(Resources.FormatClearCommand_Confirmed(count, project));
Commands\CreateCommand.cs (33)
27cmd.Description = Resources.CreateCommand_Description; 31Resources.CreateCommand_SchemeOption_Description, 37Resources.CreateCommand_NameOption_Description, 42Resources.CreateCommand_AudienceOption_Description, 47Resources.CreateCommand_IssuerOption_Description, 52Resources.CreateCommand_ScopeOption_Description, 57Resources.CreateCommand_RoleOption_Description, 62Resources.CreateCommand_ClaimOption_Description, 67Resources.CreateCommand_NotBeforeOption_Description, 72Resources.CreateCommand_ExpiresOnOption_Description, 77Resources.CreateCommand_ValidForOption_Description, 82Resources.CreateCommand_appsettingsFileOption_Description, 123reporter.Error(Resources.ProjectOption_ProjectNotFound); 136var optionsString = schemeNameOption.HasValue() ? $"{Resources.JwtPrint_Scheme}: {scheme}{Environment.NewLine}" : string.Empty; 139optionsString += $"{Resources.JwtPrint_Name}: {name}{Environment.NewLine}"; 142optionsString += audienceOption.HasValue() ? $"{Resources.JwtPrint_Audiences}: {string.Join(", ", audience)}{Environment.NewLine}" : string.Empty; 145reporter.Error(Resources.CreateCommand_NoAudience_Error); 149optionsString += issuerOption.HasValue() ? $"{Resources.JwtPrint_Issuer}: {issuer}{Environment.NewLine}" : string.Empty; 156reporter.Error(Resources.FormatCreateCommand_InvalidDate_Error("--not-before")); 159optionsString += $"{Resources.JwtPrint_NotBefore}: {notBefore:O}{Environment.NewLine}"; 167reporter.Error(Resources.FormatCreateCommand_InvalidDate_Error("--expires-on")); 173reporter.Error(Resources.CreateCommand_InvalidExpiresOn_Error); 178optionsString += $"{Resources.JwtPrint_ExpiresOn}: {expiresOn:O}{Environment.NewLine}"; 187reporter.Error(Resources.FormatCreateCommand_InvalidPeriod_Error("--valid-for")); 193reporter.Error(Resources.CreateCommand_InvalidExpiresOn_Error); 198optionsString += $"{Resources.JwtPrint_ExpiresOn}: {expiresOn:O}{Environment.NewLine}"; 203optionsString += rolesOption.HasValue() ? $"{Resources.JwtPrint_Roles}: [{string.Join(", ", roles)}]{Environment.NewLine}" : string.Empty; 206optionsString += scopesOption.HasValue() ? $"{Resources.JwtPrint_Scopes}: {string.Join(", ", scopes)}{Environment.NewLine}" : string.Empty; 213reporter.Error(Resources.CreateCommand_InvalidClaims_Error); 216optionsString += $"{Resources.JwtPrint_CustomClaims}: [{string.Join(", ", claims.Select(kvp => $"{kvp.Key}={kvp.Value}"))}]{Environment.NewLine}"; 224optionsString += appsettingsFileOption.HasValue() ? $"{Resources.JwtPrint_appsettingsFile}: {appsettingsFile}{Environment.NewLine}" : string.Empty; 277reporter.Output(Resources.FormatCreateCommand_Confirmed(jwtToken.Id)); 279reporter.Output($"{Resources.JwtPrint_Token}: {jwt.Token}");
Commands\KeyCommand.cs (10)
16cmd.Description = Resources.KeyCommand_Description; 20Resources.KeyCommand_SchemeOption_Description, 25Resources.KeyCommand_IssuerOption_Description, 31Resources.KeyCommand_ResetOption_Description, 36Resources.KeyCommand_ForceOption_Description, 63reporter.Output(Resources.KeyCommand_Permission); 67reporter.Output(Resources.KeyCommand_Canceled); 73reporter.Output(Resources.FormatKeyCommand_KeyCreated(Convert.ToBase64String(key))); 81reporter.Output(Resources.KeyCommand_KeyNotFound); 85reporter.Output(Resources.FormatKeyCommand_Confirmed(Convert.ToBase64String(signingKeyMaterial)));
Commands\ListCommand.cs (11)
16cmd.Description = Resources.ListCommand_Description; 20Resources.ListCommand_ShowTokenOption_Description, 67reporter.Output(Resources.FormatListCommand_Project(project)); 68reporter.Output(Resources.FormatListCommand_UserSecretsId(userSecretsId)); 73table.AddColumns(Resources.JwtPrint_Id, Resources.JwtPrint_Scheme, Resources.JwtPrint_Audiences, Resources.JwtPrint_IssuedOn, Resources.JwtPrint_ExpiresOn); 77table.AddColumns(Resources.JwtPrint_Token); 97reporter.Output(Resources.ListCommand_NoJwts);
Commands\PrintCommand.cs (4)
15cmd.Description = Resources.PrintCommand_Description; 17var idArgument = cmd.Argument("[id]", Resources.PrintCommand_IdArgument_Description); 18var showAllOption = cmd.Option("--show-all", Resources.PrintCommand_ShowAllOption_Description, CommandOptionType.NoValue); 49reporter.Output(Resources.FormatPrintCommand_NoJwtFound(id));
Commands\ProjectCommandLineApplication.cs (2)
22Resources.ProjectOption_Description, 27Resources.CreateCommand_OutputOption_Description,
Commands\RemoveCommand.cs (5)
15cmd.Description = Resources.RemoveCommand_Description; 17var idArgument = cmd.Argument("[id]", Resources.RemoveCommand_IdArgument_Description); 21Resources.CreateCommand_appsettingsFileOption_Description, 55reporter.Error(Resources.FormatRemoveCommand_NoJwtFound(id)); 64reporter.Output(Resources.FormatRemoveCommand_Confirmed(id));
Helpers\DevJwtCliHelpers.cs (19)
34reporter.Error(Resources.ProjectOption_ProjectNotFound); 41reporter.Error(Resources.ProjectOption_SercretIdNotFound); 55reporter.Error(Resources.RemoveCommand_InvalidAppsettingsFile_Error); 60reporter.Error(Resources.FormatRemoveCommand_AppsettingsFileNotFound_Error(Path.Combine(Path.GetDirectoryName(projectPath), appsettingsFile))); 172reporter.Output(Resources.FormatPrintCommand_Confirmed(jwt.Id)); 173reporter.Output($"{Resources.JwtPrint_Id}: {jwt.Id}"); 174reporter.Output($"{Resources.JwtPrint_Name}: {jwt.Name}"); 175reporter.Output($"{Resources.JwtPrint_Scheme}: {jwt.Scheme}"); 176reporter.Output($"{Resources.JwtPrint_Audiences}: {jwt.Audience}"); 177reporter.Output($"{Resources.JwtPrint_NotBefore}: {jwt.NotBefore:O}"); 178reporter.Output($"{Resources.JwtPrint_ExpiresOn}: {jwt.Expires:O}"); 179reporter.Output($"{Resources.JwtPrint_IssuedOn}: {jwt.Issued:O}"); 186reporter.Output($"{Resources.JwtPrint_Scopes}: {scopesValue}"); 194reporter.Output($"{Resources.JwtPrint_Roles}: [{rolesValue}]"); 202reporter.Output($"{Resources.JwtPrint_CustomClaims}: [{customClaimsValue}]"); 207reporter.Output($"{Resources.JwtPrint_TokenHeader}: {fullToken.Header.SerializeToJson()}"); 208reporter.Output($"{Resources.JwtPrint_TokenPayload}: {fullToken.Payload.SerializeToJson()}"); 211var tokenValueFieldName = showAll ? Resources.JwtPrint_CompactToken : Resources.JwtPrint_Token;
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (2)
UserJwtsTests.cs (2)
498Assert.Contains(Resources.CreateCommand_NoAudience_Error, output); 715Assert.DoesNotContain(Resources.CreateCommand_NoAudience_Error, _console.GetOutput());