class InitService {

  public InitState setOAuthClientDetails(OAuthClientDetails oauthClientDetails) {
    isInitStateElseThrow(InitStateName.SET_OAUTH_CLIENT_DETAILS);

    oauthClientDetailsService.fillDefaultValues(oauthClientDetails);
    oauthConfigurationService.updateOAuthConfiguration(oauthClientDetails);
    oauthClientDetailsService.encodeClientSecret(oauthClientDetails);
    oauthClientDetailsService.updateOAuthClientDetails(oauthClientDetails);

    return nextInitState();
  }

}