Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
add linked in oauth2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
brockallen committed Oct 16, 2013
1 parent de9cf45 commit eef7c4a
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,19 @@ private static List<IdentityProvider> CreateTestIdentityProviders()
ClientID = "00000000480DD362",
ClientSecret = "gH9ngNoSaxRrupt3UcynwI2aK8qODZvf",
OAuth2ProviderType = 3
},
},
new IdentityProvider
{
Name = "LinkedIn",
DisplayName = "LinkedIn",
Enabled = true,
ShowInHrdSelection = true,
Type = 2,
ClientID = "f8xh60airbta",
ClientSecret = "DGY4NpcP8HiFW004",
OAuth2ProviderType = 4
},

};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ public enum OAuth2ProviderTypes
Google = 1,
Facebook = 2,
Live = 3,
LinkedIn = 4
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="BrockAllen.OAuth2, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="BrockAllen.OAuth2, Version=2.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\BrockAllen.OAuth2.2.2.0\lib\net45\BrockAllen.OAuth2.dll</HintPath>
<HintPath>..\..\..\packages\BrockAllen.OAuth2.2.3.0\lib\net45\BrockAllen.OAuth2.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,8 @@ private ActionResult RedirectToOAuth2IdentityProvider(IdentityProvider ip, SignI
return new OAuth2ActionResult(oauth2, ProviderType.Facebook, null);
case OAuth2ProviderTypes.Live:
return new OAuth2ActionResult(oauth2, ProviderType.Live, null);
case OAuth2ProviderTypes.LinkedIn:
return new OAuth2ActionResult(oauth2, ProviderType.LinkedIn, null);
}

return View("Error");
Expand Down Expand Up @@ -386,6 +388,7 @@ ProviderType GetProviderTypeFromOAuthProfileTypes(OAuth2ProviderTypes type)
case OAuth2ProviderTypes.Facebook: return ProviderType.Facebook;
case OAuth2ProviderTypes.Live: return ProviderType.Live;
case OAuth2ProviderTypes.Google: return ProviderType.Google;
case OAuth2ProviderTypes.LinkedIn: return ProviderType.LinkedIn;
default: throw new Exception("Invalid OAuthProfileTypes");
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="BrockAllen.OAuth2" version="2.2.0" targetFramework="net45" />
<package id="BrockAllen.OAuth2" version="2.3.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Client" version="4.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Core" version="4.0.20710.0" targetFramework="net45" />
<package id="Microsoft.Net.Http" version="2.0.20710.0" targetFramework="net45" />
Expand Down
4 changes: 2 additions & 2 deletions src/OnPremise/WebSite/WebSite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\BrockAllen.CookieTempData.dll.1.2.1\lib\net45\BrockAllen.CookieTempData.dll</HintPath>
</Reference>
<Reference Include="BrockAllen.OAuth2, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="BrockAllen.OAuth2, Version=2.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\BrockAllen.OAuth2.2.2.0\lib\net45\BrockAllen.OAuth2.dll</HintPath>
<HintPath>..\..\..\packages\BrockAllen.OAuth2.2.3.0\lib\net45\BrockAllen.OAuth2.dll</HintPath>
</Reference>
<Reference Include="EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down
2 changes: 1 addition & 1 deletion src/OnPremise/WebSite/packages.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="BrockAllen.CookieTempData.dll" version="1.2.1" targetFramework="net45" />
<package id="BrockAllen.OAuth2" version="2.2.0" targetFramework="net45" />
<package id="BrockAllen.OAuth2" version="2.3.0" targetFramework="net45" />
<package id="EntityFramework" version="5.0.0" targetFramework="net45" />
<package id="EntityFramework.SqlServerCompact" version="4.3.6" targetFramework="net45" />
<package id="jQuery" version="1.8.2" targetFramework="net45" />
Expand Down

0 comments on commit eef7c4a

Please sign in to comment.