addon365 / b1ke-sh0wr00m

Apache License 2.0
0 stars 0 forks source link

Need to add Authentication for Rest APIs #3

Closed sathishid closed 5 years ago

sathishid commented 5 years ago

Need to add support for JWT authentication support for swApi Services.

sathishid commented 5 years ago

Implemented this feature by referring the below URL: [http://jasonwatmore.com/post/2018/08/14/aspnet-core-21-jwt-authentication-tutorial-with-example-api](JWT Authentication) Note: It just returns token without any credential, need to access api using this token.

var header = new AuthenticationHeaderValue("Bearer",Convert.ToBase64String(tokenAsByArray)); client.DefaultRequestHeaders.Authorization = header;

TODO : Need to add user Identity models and UI

  1. Removed swagger as authentication crashed swagger
  2. Marked Allow Anonymous for Inquiry Controllers method to avoid break.
  3. Need to implement authentication request in WPF.
sathishid commented 5 years ago

For Testing: Request Token: image

Using Authentication Token image