class OAuthClientDetailsService {

  public void encodeClientSecret(OAuthClientDetails oauthClientDetails) {
    oauthClientDetails.setClientSecret(
        passwordEncoder.encode(oauthClientDetails.getClientSecret()));
  }

}