The basic answer is no, it is usually a bad idea to try to implement your own security code; there are many options to help you save a lot of time and save a lot of headaches on the back side.
, - .
, POCO. Identity ( , ), OAuth /. .
, , ClaimTypes , . , , , IPrincipal, .