I know we have an authorization attribute.
In the startup.cs
After I run the API, it returns a 404 for me.
1) How to I make myself authorise to access the API?
2) Is there any other way also from which we can secure the API?
C#:
[HttpGet("{id}")]
[Authorize]
public IActionResult Get(int id)
In the startup.cs
C#:
services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddJwtBearer(JwtBearerDefaults.AuthenticationScheme, options => Configuration.Bind("JwtSettings", options))
.AddCookie(CookieAuthenticationDefaults.AuthenticationScheme, options => Configuration.Bind("CookieSettings", options));
After I run the API, it returns a 404 for me.
1) How to I make myself authorise to access the API?
2) Is there any other way also from which we can secure the API?