cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how to customize the user credentials for OCC before generating the auth Token

Former Member
0 Likes
336

Hi Experts,

For registered customers in OCC, first we generate the token based on the below URL and credentials but what i need is ,show the proper error msg for username/password respective attributes.

Note : I have given Wrong username and password

https://localhost:9002/authorizationserver/oauth/token?client_id=mobile_android&client_secret=secret...

current Output :

{ "error": "invalid_grant", "error_description": "Bad credentials" }


But our requirement is to give proper error messages like username is invalid /Password is invalid instead.

Accepted Solutions (0)

Answers (1)

Answers (1)

skotni
Explorer
0 Likes

Have a look at the OOTB class "CoreAuthenticationProvider". It has the logic to show error messages. By default it shows "Bad credentials" message.

May be, you would need to customize that based on your requirement.