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