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

Steps for configuring OAuth2 token in 6.7 for mobile App?

0 Kudos
250

I am trying to configure login webservices forAndroid/iOS in Hybris 6.7. Can you please share the steps for configuration using oAuth token.?

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

1)create a custom mobile API - /device/oauth/token. 2)Make sure you are passing "customerid","password","deviceType" using DTO . 3) Validate the userdetails 4) then Configuration config = getConfigurationService().getConfiguration(); UsernamePasswordAuthenticationToken authRequest= new UsernamePasswordAuthenticationToken(config.getString("trusted.client_id", "trusted_client"), config.getString("trusted.client_password", "secret"));

Authentication authResult = this.getClientAuthenticationManager().authenticate(authRequest);

5)Validate customer username and password and generate the token