In short:
client_id
and client_secret
are used for to authenticate the APP
.
username
and password
are used for to authenticate the user
.
It also means double layer protection.
The specification says:
the client MUST authenticate with the authorization server as described in Section 3.2.1.
A client authentication is done by using a client_id
and a client_secret
value.
Actually the latest paragraph of the section 3.2.1 says
A public client that was not issued a client password MAY use the client_id request parameter to identify itself when sending requests to the token endpoint (e.g. for the purpose of providing end-user context, client usage statistics).
However, it just may.
But Google gives a client_id
and a client_secret
on the developer console when trying to use an API.
If you want to use Resource Owner Password Credentials
for an API or a Web authorization you might provide a register page to your clients to register themselves. (I recommend using of Client Credentials flow for API)
If you want to use Resource Owner Password Credentials
for a mobile app you might give a standart client_id
like AwesomeAPP
and a client_secret
like Bl**123_Blabla
.
Or you may use AwesomeAPP_v1.0
as client_id
to track that how many people use which version of the App although it's not the best way. But you may.
Hope this helps...