Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Commit

Permalink
Remove Google OpenId
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Aug 14, 2014
1 parent b4dc10e commit 880d089
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 38 deletions.
1 change: 0 additions & 1 deletion src/SocialBootstrapApi/AppHost.cs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ private void ConfigureAuth(Funq.Container container, IAppSettings appSettings)
new FacebookAuthProvider(appSettings), //Sign-in with Facebook new FacebookAuthProvider(appSettings), //Sign-in with Facebook
new DigestAuthProvider(appSettings), //Sign-in with Digest Auth new DigestAuthProvider(appSettings), //Sign-in with Digest Auth
new BasicAuthProvider(), //Sign-in with Basic Auth new BasicAuthProvider(), //Sign-in with Basic Auth
new GoogleOpenIdOAuthProvider(appSettings), //Sign-in with Google OpenId
new YahooOpenIdOAuthProvider(appSettings), //Sign-in with Yahoo OpenId new YahooOpenIdOAuthProvider(appSettings), //Sign-in with Yahoo OpenId
new OpenIdOAuthProvider(appSettings), //Sign-in with Custom OpenId new OpenIdOAuthProvider(appSettings), //Sign-in with Custom OpenId
})); }));
Expand Down
6 changes: 0 additions & 6 deletions src/SocialBootstrapApi/Models/CustomUserSession.cs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ public override void OnAuthenticated(IServiceBase authService, IAuthSession sess
{ {
user.TwitterName = user.DisplayName = authToken.UserName; user.TwitterName = user.DisplayName = authToken.UserName;
} }
else if (authToken.Provider == GoogleOpenIdOAuthProvider.Name)
{
user.GoogleUserId = authToken.UserId;
user.GoogleFullName = authToken.FullName;
user.GoogleEmail = authToken.Email;
}
else if (authToken.Provider == YahooOpenIdOAuthProvider.Name) else if (authToken.Provider == YahooOpenIdOAuthProvider.Name)
{ {
user.YahooUserId = authToken.UserId; user.YahooUserId = authToken.UserId;
Expand Down
3 changes: 0 additions & 3 deletions src/SocialBootstrapApi/Models/User.cs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ public class User
public string FacebookUserId { get; set; } public string FacebookUserId { get; set; }
public string FacebookUserName { get; set; } public string FacebookUserName { get; set; }
public string FacebookEmail { get; set; } public string FacebookEmail { get; set; }
public string GoogleUserId { get; set; }
public string GoogleFullName { get; set; }
public string GoogleEmail { get; set; }
public string YahooUserId { get; set; } public string YahooUserId { get; set; }
public string YahooFullName { get; set; } public string YahooFullName { get; set; }
public string YahooEmail { get; set; } public string YahooEmail { get; set; }
Expand Down
23 changes: 23 additions & 0 deletions src/SocialBootstrapApi/Properties/PublishProfiles/WebDeploy.pubxml
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>http://bootstrapapi.servicestack.net</SiteUrlToLaunchAfterPublish>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<MSDeployServiceURL>ec2-54-83-56-243.compute-1.amazonaws.com</MSDeployServiceURL>
<DeployIisAppPath>bootstrapapi</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<UserName>Administrator</UserName>
<_SavePWD>True</_SavePWD>
</PropertyGroup>
</Project>
11 changes: 0 additions & 11 deletions src/SocialBootstrapApi/ServiceInterface/UserProfileService.cs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ public class UserProfile
public string FacebookUserId { get; set; } public string FacebookUserId { get; set; }
public string FacebookUserName { get; set; } public string FacebookUserName { get; set; }
public string FacebookEmail { get; set; } public string FacebookEmail { get; set; }
public string GoogleUserId { get; set; }
public string GoogleFullName { get; set; }
public string GoogleEmail { get; set; }
public string YahooUserId { get; set; } public string YahooUserId { get; set; }
public string YahooFullName { get; set; } public string YahooFullName { get; set; }
public string YahooEmail { get; set; } public string YahooEmail { get; set; }
Expand Down Expand Up @@ -52,14 +49,6 @@ public object Get(UserProfile request)


var userAuths = Db.Select<UserAuthDetails>(q => q.UserAuthId == session.UserAuthId.ToInt()); var userAuths = Db.Select<UserAuthDetails>(q => q.UserAuthId == session.UserAuthId.ToInt());


var googleAuth = userAuths.FirstOrDefault(x => x.Provider == GoogleOpenIdOAuthProvider.Name);
if (googleAuth != null)
{
userProfile.GoogleUserId = googleAuth.UserId;
userProfile.GoogleFullName = googleAuth.FullName;
userProfile.GoogleEmail = googleAuth.Email;
}

var yahooAuth = userAuths.FirstOrDefault(x => x.Provider == YahooOpenIdOAuthProvider.Name); var yahooAuth = userAuths.FirstOrDefault(x => x.Provider == YahooOpenIdOAuthProvider.Name);
if (yahooAuth != null) if (yahooAuth != null)
{ {
Expand Down
5 changes: 3 additions & 2 deletions src/SocialBootstrapApi/SocialBootstrapApi.csproj
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>packages\ServiceStack.Authentication.OAuth2.4.0.31\lib\net40\ServiceStack.Authentication.OAuth2.dll</HintPath> <HintPath>packages\ServiceStack.Authentication.OAuth2.4.0.31\lib\net40\ServiceStack.Authentication.OAuth2.dll</HintPath>
</Reference> </Reference>
<Reference Include="ServiceStack.Authentication.OpenId, Version=4.0.31.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="ServiceStack.Authentication.OpenId, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\ServiceStack\src\ServiceStack.Authentication.OpenId\bin\Release\ServiceStack.Authentication.OpenId.dll</HintPath> <HintPath>packages\ServiceStack.Authentication.OpenId.4.0.31\lib\net40\ServiceStack.Authentication.OpenId.dll</HintPath>
</Reference> </Reference>
<Reference Include="ServiceStack.Client, Version=4.0.31.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="ServiceStack.Client, Version=4.0.31.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
Expand Down Expand Up @@ -984,6 +984,7 @@
<Content Include="packages.config"> <Content Include="packages.config">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Content> </Content>
<None Include="Properties\PublishProfiles\WebDeploy.pubxml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="Content\css\mixins.less"> <None Include="Content\css\mixins.less">
Expand Down
15 changes: 0 additions & 15 deletions src/SocialBootstrapApi/Views/Shared/Index.cshtml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -36,15 +36,6 @@
<dt>Email</dt><dd><%= facebookEmail %></dd> <dt>Email</dt><dd><%= facebookEmail %></dd>
</dl> </dl>
</div> </div>
<% } if (googleUserId) { %>
<div id="google-info">
<h4>Google Info</h4>
<dl>
<dt>User Id</dt><dd><%= googleUserId %></dd>
<dt>Full Name</dt><dd><%= googleFullName %></dd>
<dt>Email</dt><dd><%= googleEmail %></dd>
</dl>
</div>
<% } if (yahooUserId) { %> <% } if (yahooUserId) { %>
<div id="yahoo-info"> <div id="yahoo-info">
<h4>Yahoo Info</h4> <h4>Yahoo Info</h4>
Expand Down Expand Up @@ -364,12 +355,6 @@


<h4 style="margin: 20px 0 10px 0;">Open Id Providers</h4> <h4 style="margin: 20px 0 10px 0;">Open Id Providers</h4>


<div id="google-signin">
<form action="@Url.Content("~/api/auth/googleopenid")" method="POST">
<input type="image" src="@Url.Content("~/Content/img/sign-in-with-google.png")" alt="Sign in with Google">
</form>
</div>

<div id="yahoo-signin"> <div id="yahoo-signin">
<form action="@Url.Content("~/api/auth/yahooopenid")" method="POST"> <form action="@Url.Content("~/api/auth/yahooopenid")" method="POST">
<input type="image" src="@Url.Content("~/Content/img/sign-in-with-yahoo.png")" alt="Sign in with Yahoo!"> <input type="image" src="@Url.Content("~/Content/img/sign-in-with-yahoo.png")" alt="Sign in with Yahoo!">
Expand Down

0 comments on commit 880d089

Please sign in to comment.