You can create multiple entries in table oauth_client_details with different combination of client_id and client_secret. The client_secret obviously will be encrypted.
Now to generate the refresh and access token, hit the url
/oauth/token
with Authorization : Basic base64-encoded
,
Where base64-encoded will be Base64 encryption of client_id:client_secret
.
Remember, client_secret here should be original plain password (without encryption).
The same thing can be achieved using Spring xml configuration (in older way) as
<oauth:client client-id="mobile_ios"
authorized-grant-types="password,refresh_token,implicit" secret="ios_s3cret"
authorities="ROLE_CLIENT"
refresh-token-validity="7776000"
access-token-validity="300" />
<oauth:client client-id="mobile_android"
authorized-grant-types="password,refresh_token,implicit" secret="android_s3cret"
authorities="ROLE_CLIENT"
refresh-token-validity="7776000"
access-token-validity="300" />
<oauth:client client-id="web_app"
authorized-grant-types="password,refresh_token,implicit" secret="web_s3cret"
authorities="ROLE_CLIENT"
refresh-token-validity="7776000"
access-token-validity="30000" />
</oauth:client-details-service>