private void pickOnlyProvider() throws ServletException {
  try {
    Entry<OAuthLoginProvider> loginProvider=Iterables.getOnlyElement(loginProviders);
    defaultAuthPlugin=loginProvider.getPluginName();
    defaultAuthProvider=loginProvider.getExportName();
  }
 catch (  NoSuchElementException e) {
    throw new ServletException("No OAuth login provider installed");
  }
catch (  IllegalArgumentException e) {
  }
}

private void pickOnlyProvider ( ) throws ServletException { try { Entry < OAuthLoginProvider > loginProvider = Iterables . getOnlyElement ( loginProviders ) ; defaultAuthPlugin = loginProvider . getPluginName ( ) ; defaultAuthProvider = loginProvider . getExportName ( ) ; } catch ( NoSuchElementException e ) { throw new ServletException ( "No OAuth login provider installed" ) ; } catch ( IllegalArgumentException e ) { } }
picks the only installed oauth provider . if there is a multiude of providers available , the actual provider must be determined from the authentication request .
