2 instantiations of Jwt
dotnet-user-jwts (2)
_generated\0\JwtSerializerContext.Jwt.g.cs (1)
32ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt((string)args[0], (string)args[1], (string)args[2], (string)args[3], (global::System.DateTimeOffset)args[4], (global::System.DateTimeOffset)args[5], (global::System.DateTimeOffset)args[6], (string)args[7]),
Helpers\Jwt.cs (1)
27return new Jwt(token.Id, scheme, token.Subject, string.Join(", ", token.Audiences), token.ValidFrom, token.ValidTo, token.IssuedAt, encodedToken)
116 references to Jwt
dotnet-user-jwts (116)
_generated\0\JwtSerializerContext.Jwt.g.cs (74)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt>? _Jwt; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt> Jwt 22get => _Jwt ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt>)Options.GetTypeInfo(typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt> Create_Jwt(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt> jsonTypeInfo)) 29var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt> 35ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(string), typeof(string), typeof(string), typeof(global::System.DateTimeOffset), typeof(global::System.DateTimeOffset), typeof(global::System.DateTimeOffset), typeof(string)}, modifiers: null), 41jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt>(options, objectInfo); 58DeclaringType = typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt), 60Getter = static obj => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).Id, 61Setter = static (obj, value) => __set_Jwt_Id((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj, value!), 68AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetProperty("Id", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 78DeclaringType = typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt), 80Getter = static obj => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).Scheme, 81Setter = static (obj, value) => __set_Jwt_Scheme((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj, value!), 88AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetProperty("Scheme", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 98DeclaringType = typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt), 100Getter = static obj => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).Name, 101Setter = static (obj, value) => __set_Jwt_Name((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj, value!), 108AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetProperty("Name", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 118DeclaringType = typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt), 120Getter = static obj => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).Audience, 121Setter = static (obj, value) => __set_Jwt_Audience((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj, value!), 128AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetProperty("Audience", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 138DeclaringType = typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt), 140Getter = static obj => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).NotBefore, 141Setter = static (obj, value) => __set_Jwt_NotBefore((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj, value!), 148AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetProperty("NotBefore", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset), global::System.Array.Empty<global::System.Type>(), null), 158DeclaringType = typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt), 160Getter = static obj => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).Expires, 161Setter = static (obj, value) => __set_Jwt_Expires((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj, value!), 168AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetProperty("Expires", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset), global::System.Array.Empty<global::System.Type>(), null), 178DeclaringType = typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt), 180Getter = static obj => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).Issued, 181Setter = static (obj, value) => __set_Jwt_Issued((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj, value!), 188AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetProperty("Issued", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset), global::System.Array.Empty<global::System.Type>(), null), 198DeclaringType = typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt), 200Getter = static obj => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).Token, 201Setter = static (obj, value) => __set_Jwt_Token((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj, value!), 208AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetProperty("Token", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 218DeclaringType = typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt), 220Getter = static obj => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).Scopes, 221Setter = static (obj, value) => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).Scopes = value!, 228AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetProperty("Scopes", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IEnumerable<string>), global::System.Array.Empty<global::System.Type>(), null), 238DeclaringType = typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt), 240Getter = static obj => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).Roles, 241Setter = static (obj, value) => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).Roles = value!, 248AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetProperty("Roles", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IEnumerable<string>), global::System.Array.Empty<global::System.Type>(), null), 258DeclaringType = typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt), 260Getter = static obj => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).CustomClaims, 261Setter = static (obj, value) => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).CustomClaims = value!, 268AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetProperty("CustomClaims", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IDictionary<string, string>), global::System.Array.Empty<global::System.Type>(), null), 278private void JwtSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt? value) 288writer.WriteString(PropName_Id, ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)value).Id); 289writer.WriteString(PropName_Scheme, ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)value).Scheme); 290writer.WriteString(PropName_Name, ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)value).Name); 291writer.WriteString(PropName_Audience, ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)value).Audience); 292writer.WriteString(PropName_NotBefore, ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)value).NotBefore); 293writer.WriteString(PropName_Expires, ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)value).Expires); 294writer.WriteString(PropName_Issued, ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)value).Issued); 295writer.WriteString(PropName_Token, ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)value).Token); 297IEnumerableStringSerializeHandler(writer, ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)value).Scopes); 299IEnumerableStringSerializeHandler(writer, ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)value).Roles); 301IDictionaryStringStringSerializeHandler(writer, ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)value).CustomClaims); 390private static extern void __set_Jwt_Id(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt obj, string value); 392private static extern void __set_Jwt_Scheme(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt obj, string value); 394private static extern void __set_Jwt_Name(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt obj, string value); 396private static extern void __set_Jwt_Audience(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt obj, string value); 398private static extern void __set_Jwt_NotBefore(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt obj, global::System.DateTimeOffset value); 400private static extern void __set_Jwt_Expires(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt obj, global::System.DateTimeOffset value); 402private static extern void __set_Jwt_Issued(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt obj, global::System.DateTimeOffset value); 404private static extern void __set_Jwt_Token(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt obj, string value);
_generated\1\JwtSerializerContext.JwtArray.g.cs (10)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt[]>? _JwtArray; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt[]> JwtArray 22get => _JwtArray ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt[]>)Options.GetTypeInfo(typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt[])); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt[]> Create_JwtArray(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt[]>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt[]> jsonTypeInfo)) 29var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt[]> 37jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateArrayInfo<global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt>(options, info); 47private void JwtArraySerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt[]? value)
_generated\12\JwtSerializerContext.GetJsonTypeInfo.g.cs (3)
22if (type == typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)) 26if (type == typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt[])) 38if (type == typeof(global::System.Collections.Generic.IDictionary<string, global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt>))
_generated\4\JwtSerializerContext.IDictionaryStringJwt.g.cs (13)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IDictionary<string, global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt>>? _IDictionaryStringJwt; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IDictionary<string, global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt>> IDictionaryStringJwt 22get => _IDictionaryStringJwt ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IDictionary<string, global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.IDictionary<string, global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt>)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IDictionary<string, global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt>> Create_IDictionaryStringJwt(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.IDictionary<string, global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IDictionary<string, global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt>> jsonTypeInfo)) 29var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.IDictionary<string, global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt>> 31ObjectCreator = () => new global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt>(), 37jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateIDictionaryInfo<global::System.Collections.Generic.IDictionary<string, global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt>, string, global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt>(options, info); 47private void IDictionaryStringJwtSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.IDictionary<string, global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt>? value) 57foreach (global::System.Collections.Generic.KeyValuePair<string, global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt> entry in value)
Commands\CreateCommand.cs (2)
259var jwt = Jwt.Create(options.Scheme, jwtToken, JwtIssuer.WriteToken(jwtToken), options.Scopes, options.Roles, options.Claims);
Commands\ListCommand.cs (2)
66reporter.Output(JsonSerializer.Serialize(Array.Empty<Jwt>(), JwtSerializerContext.Default.JwtArray)); 87var jwt = jwtRow.Value;
Commands\PrintCommand.cs (1)
53if (!jwtStore.Jwts.TryGetValue(id, out var jwt))
Commands\RemoveCommand.cs (1)
58if (!jwtStore.Jwts.TryGetValue(id, out var jwt))
Helpers\DevJwtCliHelpers.cs (3)
230public static void PrintJwt(IReporter reporter, Jwt jwt, bool showAll, string outputFormat, JwtSecurityToken fullToken = null) 245static void PrintJwtJson(IReporter reporter, Jwt jwt, bool showAll, JwtSecurityToken fullToken) 250static void PrintJwtDefault(IReporter reporter, Jwt jwt, bool showAll, JwtSecurityToken fullToken)
Helpers\Jwt.cs (1)
19public static Jwt Create(
Helpers\JwtSerializerOptions.cs (3)
21[JsonSerializable(typeof(IDictionary<string, Jwt>))] 22[JsonSerializable(typeof(Jwt))] 23[JsonSerializable(typeof(Jwt[]))]
Helpers\JwtStore.cs (3)
24public IDictionary<string, Jwt> Jwts { get; private set; } = new Dictionary<string, Jwt>(); 33Jwts = JsonSerializer.Deserialize(fileStream, JwtSerializerContext.Default.IDictionaryStringJwt) ?? new Dictionary<string, Jwt>();