()
| 254 | }); |
| 255 | } |
| 256 | |
| 257 | private int GetUserId() |
| 258 | { |
| 259 | var idClaim = User.FindFirst(ClaimTypes.NameIdentifier)?.Value |
| 260 | ?? User.FindFirst("sub")?.Value |
| 261 | ?? User.FindFirst("id")?.Value; |
| 262 | |
| 263 | if (int.TryParse(idClaim, out int userId)) return userId; |
| 264 | return 0; |
| 265 | } |
| 266 | } |
nothing calls this directly
no outgoing calls
no test coverage detected