MVC5 Authentication Filters

What is the difference between new authentication and previous authorization filters ?. I do not see any difference. I have always used:[Authorize(Roles = "Admin, User")]

When do you want to use an authentication filter? and when to use authorization?

Can someone explain this difference? Samples would be great. thanks

+4
source share
3 answers

You can find the article here :

Ive also created a similar post here :

Although the answer I got was right to clarify some things, but I'm still a bit confused about how to use it, but more with the expected behavior (as you will see if you read my post).

Authentication Authorization.

, , , -. , - , . "", ... .

, , http 401 .


Authorization, , , Authorized . , http 403 . [Authorize].


, , , , . , ...

: Authentication , , ( ) [AllowAnonymous]. , .

, [Authorize] ( ) [AllowAnonymous].

, , , Im , .

+4

, , - , "" - - . , , , , , ( "" ).

( ), . , ( ) . . . , , , .

, , Facebook, , ( , ). , Single Sign On (SSO). (, ) .

. ; , , . , . . , , , .

[Authorized] - Roles=, , , , , . . , . . MVC5, , : cookie ASP.NET, (). , oAuth SSO , . : " cookie, Facebook , ":).

+3

MVC 5 . MVC 5. . , . . , .

0

All Articles