И я тогда вообще не понимаю зачем тогда использовать JWT, если для сайта на одном домене есть куки, а для аутентификации на нескольких доменах есть Oauth 2
The OAuth 2.0 authorization framework enables a third-party
application to obtain limited access to an HTTP service, either on
behalf of a resource owner by orchestrating an approval interaction
between the resource owner and the HTTP service, or by allowing the
third-party application to obtain access on its own behalf.
.method public hidebysig static float64
Average(
class [System.Runtime]System.Collections.Generic.IEnumerable`1<int32> source
) cil managed
{
.custom instance void [System.Runtime]System.Runtime.CompilerServices.ExtensionAttribute::.ctor()
= (01 00 00 00 )
.maxstack 2
.locals init (
[0] class [System.Runtime]System.Collections.Generic.IEnumerator`1<int32> e,
[1] int64 sum,
[2] int64 count,
[3] float64 V_3
)
// [12 13 - 12 32]
IL_0000: ldarg.0 // source
IL_0001: brtrue.s IL_000a
// [14 17 - 14 82]
IL_0003: ldc.i4.s 16 // 0x10
IL_0005: call void System.Linq.ThrowHelper::ThrowArgumentNullException(valuetype System.Linq.ExceptionArgument)
// [17 20 - 17 63]
IL_000a: ldarg.0 // source
IL_000b: callvirt instance class [System.Runtime]System.Collections.Generic.IEnumerator`1<!0/*int32*/> class [System.Runtime]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
IL_0010: stloc.0 // e
.try
{
// [19 17 - 19 35]
IL_0011: ldloc.0 // e
IL_0012: callvirt instance bool [System.Runtime]System.Collections.IEnumerator::MoveNext()
IL_0017: brtrue.s IL_001e
// [21 21 - 21 60]
IL_0019: call void System.Linq.ThrowHelper::ThrowNoElementsException()
// [24 17 - 24 38]
IL_001e: ldloc.0 // e
IL_001f: callvirt instance !0/*int32*/ class [System.Runtime]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
IL_0024: conv.i8
IL_0025: stloc.1 // sum
// [25 17 - 25 32]
IL_0026: ldc.i4.1
IL_0027: conv.i8
IL_0028: stloc.2 // count
IL_0029: br.s IL_003a
// start of loop, entry point: IL_003a
// [30 25 - 30 42]
IL_002b: ldloc.1 // sum
IL_002c: ldloc.0 // e
IL_002d: callvirt instance !0/*int32*/ class [System.Runtime]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
IL_0032: conv.i8
IL_0033: add.ovf
IL_0034: stloc.1 // sum
// [31 25 - 31 33]
IL_0035: ldloc.2 // count
IL_0036: ldc.i4.1
IL_0037: conv.i8
IL_0038: add.ovf
IL_0039: stloc.2 // count
// [28 21 - 28 41]
IL_003a: ldloc.0 // e
IL_003b: callvirt instance bool [System.Runtime]System.Collections.IEnumerator::MoveNext()
IL_0040: brtrue.s IL_002b
// end of loop
// [35 17 - 35 44]
IL_0042: ldloc.1 // sum
IL_0043: conv.r8
IL_0044: ldloc.2 // count
IL_0045: conv.r8
IL_0046: div
IL_0047: stloc.3 // V_3
IL_0048: leave.s IL_0054
} // end of .try
finally
{
IL_004a: ldloc.0 // e
IL_004b: brfalse.s IL_0053
IL_004d: ldloc.0 // e
IL_004e: callvirt instance void [System.Runtime]System.IDisposable::Dispose()
IL_0053: endfinally
} // end of finally
// [37 9 - 37 10]
IL_0054: ldloc.3 // V_3
IL_0055: ret
} // end of method Enumerable::Average
.method public hidebysig static float64
ManualAverage(
class [System.Collections]System.Collections.Generic.Dictionary`2<string, int32> stuff
) cil managed
{
.maxstack 2
.locals init (
[0] int64 sum,
[1] valuetype [System.Collections]System.Collections.Generic.Dictionary`2/Enumerator<string, int32> V_1,
[2] valuetype [System.Runtime]System.Collections.Generic.KeyValuePair`2<string, int32> worker
)
// [18 13 - 18 26]
IL_0000: ldc.i4.0
IL_0001: conv.i8
IL_0002: stloc.0 // sum
// [22 40 - 22 45]
IL_0003: ldarg.0 // stuff
IL_0004: callvirt instance valuetype [System.Collections]System.Collections.Generic.Dictionary`2/Enumerator<!0/*string*/, !1/*int32*/> class [System.Collections]System.Collections.Generic.Dictionary`2<string, int32>::GetEnumerator()
IL_0009: stloc.1 // V_1
.try
{
IL_000a: br.s IL_001f
// start of loop, entry point: IL_001f
// [22 26 - 22 36]
IL_000c: ldloca.s V_1
IL_000e: call instance valuetype [System.Runtime]System.Collections.Generic.KeyValuePair`2<!0/*string*/, !1/*int32*/> valuetype [System.Collections]System.Collections.Generic.Dictionary`2/Enumerator<string, int32>::get_Current()
IL_0013: stloc.2 // worker
// [24 21 - 24 41]
IL_0014: ldloc.0 // sum
IL_0015: ldloca.s worker
IL_0017: call instance !1/*int32*/ valuetype [System.Runtime]System.Collections.Generic.KeyValuePair`2<string, int32>::get_Value()
IL_001c: conv.i8
IL_001d: add.ovf
IL_001e: stloc.0 // sum
// [22 37 - 22 39]
IL_001f: ldloca.s V_1
IL_0021: call instance bool valuetype [System.Collections]System.Collections.Generic.Dictionary`2/Enumerator<string, int32>::MoveNext()
IL_0026: brtrue.s IL_000c
// end of loop
IL_0028: leave.s IL_0038
} // end of .try
finally
{
IL_002a: ldloca.s V_1
IL_002c: constrained. valuetype [System.Collections]System.Collections.Generic.Dictionary`2/Enumerator<string, int32>
IL_0032: callvirt instance void [System.Runtime]System.IDisposable::Dispose()
IL_0037: endfinally
} // end of finally
// [28 13 - 28 47]
IL_0038: ldloc.0 // sum
IL_0039: conv.r8
IL_003a: ldarg.0 // stuff
IL_003b: callvirt instance int32 class [System.Collections]System.Collections.Generic.Dictionary`2<string, int32>::get_Count()
IL_0040: conv.r8
IL_0041: div
IL_0042: ret
} // end of method Program::ManualAverage