Example #1
0
  LinkedInService::LinkedInService(const AuthService& baseAuth, bool getUserProfileAsJson)
    : OAuthService(baseAuth)
  { 
    this->getUserProfileAsJson = getUserProfileAsJson;

    popupDialogWidth = 500;
    popupDialogHeight = 600;

    try
    {
      std::string propertyValue = configurationProperty(LinkedInPopupWidthProperty);
      popupDialogWidth = atoi(propertyValue.c_str());
    }
    catch (Wt::WException* e) 
    {    	
      LOG_ERROR("LinkedInService(): could not read configuration property " << LinkedInPopupWidthProperty << ": " << e->what() << ", using default value " << popupDialogWidth);
    }
    try
    {
      std::string propertyValue = configurationProperty(LinkedInPopupHeightProperty);
      popupDialogHeight = atoi(propertyValue.c_str());
    }
    catch (Wt::WException* e)
    {
      LOG_ERROR("LinkedInService(): could not read configuration property " << LinkedInPopupHeightProperty << ": " << e->what() << ", using default value " << popupDialogHeight);
    }
  }
Example #2
0
 bool LinkedInService::configured()
 {
   try {
     configurationProperty(RedirectEndpointProperty);
     configurationProperty(ClientIdProperty);
     configurationProperty(ClientSecretProperty);
     return true;
   } 
   catch (const std::exception& e) {
     LOG_INFO("not configured: " << e.what());
     return false;
   }
 }    
Example #3
0
std::string FacebookService::redirectEndpointPath() const
{
  try {
    return configurationProperty(RedirectEndpointPathProperty);
  } catch (const std::exception& e) {
    return OAuthService::redirectEndpointPath();
  }
}
Example #4
0
GoogleService::GoogleService(const AuthService& baseAuth)
  : OidcService(baseAuth)
{
  setRedirectEndpoint(configurationProperty(RedirectEndpointProperty));
  setClientId(configurationProperty(ClientIdProperty));
  setClientSecret(configurationProperty(ClientSecretProperty));

  setAuthEndpoint("https://accounts.google.com/o/oauth2/v2/auth");
  setTokenEndpoint("https://www.googleapis.com/oauth2/v4/token");
  setUserInfoEndpoint("https://www.googleapis.com/oauth2/v3/userinfo");

  setAuthenticationScope("openid email profile");

  setName("google");
  setDescription("Google Account");
  setPopupWidth(550);
}
Example #5
0
std::string FacebookService::clientSecret() const
{
  return configurationProperty(ClientSecretProperty);
}
Example #6
0
std::string FacebookService::redirectEndpoint() const
{
  return configurationProperty(RedirectEndpointProperty);
}
Example #7
0
 std::string LinkedInService::clientSecret() const
 {
   return configurationProperty(ClientSecretProperty);
 }
Example #8
0
 std::string LinkedInService::redirectEndpoint() const
 {
   return configurationProperty(RedirectEndpointProperty);
 }