Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

basic authorization in ASP.NET Core

$
0
0

just reading this one https://code.msdn.microsoft.com/How-to-achieve-a-basic-719991c1

see this line of code because i have few questions

public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
    app.UseCookieAuthentication(new CookieAuthenticationOptions
    {
        AuthenticationScheme = "Cookie",
        LoginPath = new PathString("/Account/Login"),
        AccessDeniedPath = new PathString("/Account/Forbidden"),
        AutomaticAuthenticate = true,
        AutomaticChallenge = true
    });

}

1) what is the meaning of this line AuthenticationScheme = "Cookie", ? what other value we can pass instead of cookie ?

2) please tell me the meaning of below lines meaning

AccessDeniedPath = new PathString("/Account/Forbidden"),
        AutomaticAuthenticate = true,
        AutomaticChallenge = true 

a) what is AccessDeniedPath usage ?

b) what is AutomaticAuthenticate

c) what is AutomaticChallenge ?

please guide me in details. thanks


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>