-1

I have implemented web APIs using ado.net and uploaded in hosting, but those web APIs are not secured, anyone can access without login, and now I want to secure them with the role-based authentication how can I secure? I want to do that only a login user can access them.

1 Answers1

0

You can protect your api with token authentication ,In order to acquire a token user would have have to first login in the authentication server ,acquire a token and then call the api.You can assign roles to the user so that the roles are included in token and can be validated when the token validation occurs at api level. You can use identity server as an identity provider if you dont have a identity provider set up.

Aditya Singh
  • 137
  • 6