Code Ratchet
Code Ratchet

Reputation: 6029

Identity Server 4 - REST API request to authenticate user

I am currently diving into Identity Server 4 and working on a local project for my own learning.

I currently have a login page located within the Identity Server 4 project which allows the user to login, this works perfectly fine.

The question I have is, can I make a REST API request passing in username and password to authenticate the user instead of using the login page located within the Identity Server project? this may sound a very simple question for some, but my knowledge on this is very limited at present.

Upvotes: 0

Views: 587

Answers (1)

AndrewSilver
AndrewSilver

Reputation: 1163

You are talking about Resource owner password flow.
It allows you to request access token with username/password pair. After that you can use access token in a usual way to access your API.
Link above says that

The spec recommends using the resource owner password grant only for “trusted” (or legacy) applications.

Upvotes: 1

Related Questions