Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge remote-tracking branch 'upstream/master'

Conflicts:
	MVC4/PersonaMVC4Example/Controllers/PersonaController.cs
	MVC4/PersonaMVC4Example/Views/Account/Login.cshtml
  • Loading branch information...
commit c8ad1aa7d298e62c026290507baaacd15f08c99f 2 parents 29482fe + 05589f8
@rmbrunet rmbrunet authored
View
22 .gitattributes
@@ -0,0 +1,22 @@
+# Auto detect text files and perform LF normalization
+* text=auto
+
+# Custom for Visual Studio
+*.cs diff=csharp
+*.sln merge=union
+*.csproj merge=union
+*.vbproj merge=union
+*.fsproj merge=union
+*.dbproj merge=union
+
+# Standard to msysgit
+*.doc diff=astextplain
+*.DOC diff=astextplain
+*.docx diff=astextplain
+*.DOCX diff=astextplain
+*.dot diff=astextplain
+*.DOT diff=astextplain
+*.pdf diff=astextplain
+*.PDF diff=astextplain
+*.rtf diff=astextplain
+*.RTF diff=astextplain
View
14 .gitignore
@@ -1,8 +1,8 @@
-# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
-bin
-obj
-Packages
-*.suo
-
-# mstest test results
+# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
+bin
+obj
+Packages
+*.suo
+
+# mstest test results
TestResults
View
10 MVC4/.nuget/NuGet.Config
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8"?>
-<configuration>
- <solution>
- <add key="disableSourceControlIntegration" value="true" />
- </solution>
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <solution>
+ <add key="disableSourceControlIntegration" value="true" />
+ </solution>
</configuration>
View
304 MVC4/.nuget/NuGet.targets
@@ -1,153 +1,153 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
-
- <!-- Enable the restore command to run before builds -->
- <RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>
-
- <!-- Property that enables building a package from a project -->
- <BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
-
- <!-- Determines if package restore consent is required to restore packages -->
- <RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>
-
- <!-- Download NuGet.exe if it does not already exist -->
- <DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
- </PropertyGroup>
-
- <ItemGroup Condition=" '$(PackageSources)' == '' ">
- <!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
- <!-- The official NuGet package source (https://nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
- <!--
- <PackageSource Include="https://nuget.org/api/v2/" />
- <PackageSource Include="https://my-nuget-source/nuget/" />
- -->
- </ItemGroup>
-
- <PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
- <!-- Windows specific commands -->
- <NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
- <PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig>
- <PackagesDir>$([System.IO.Path]::Combine($(SolutionDir), "packages"))</PackagesDir>
- </PropertyGroup>
-
- <PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
- <!-- We need to launch nuget.exe with the mono command if we're not on windows -->
- <NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
- <PackagesConfig>packages.config</PackagesConfig>
- <PackagesDir>$(SolutionDir)packages</PackagesDir>
- </PropertyGroup>
-
- <PropertyGroup>
- <!-- NuGet command -->
- <NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\nuget.exe</NuGetExePath>
- <PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
-
- <NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
- <NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>
-
- <PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
-
- <RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
- <!-- Commands -->
- <RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(RequireConsentSwitch) -o "$(PackagesDir)"</RestoreCommand>
- <BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols</BuildCommand>
-
- <!-- We need to ensure packages are restored prior to assembly resolve -->
- <ResolveReferencesDependsOn Condition="$(RestorePackages) == 'true'">
- RestorePackages;
- $(ResolveReferencesDependsOn);
- </ResolveReferencesDependsOn>
-
- <!-- Make the build depend on restore packages -->
- <BuildDependsOn Condition="$(BuildPackage) == 'true'">
- $(BuildDependsOn);
- BuildPackage;
- </BuildDependsOn>
- </PropertyGroup>
-
- <Target Name="CheckPrerequisites">
- <!-- Raise an error if we're unable to locate nuget.exe -->
- <Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
- <SetEnvironmentVariable EnvKey="VisualStudioVersion" EnvValue="$(VisualStudioVersion)" Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' " />
- <!--
- Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
- This effectively acts as a lock that makes sure that the download operation will only happen once and all
- parallel builds will have to wait for it to complete.
- -->
- <MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT" />
- </Target>
-
- <Target Name="_DownloadNuGet">
- <DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
- </Target>
-
- <Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
- <Exec Command="$(RestoreCommand)"
- Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
-
- <Exec Command="$(RestoreCommand)"
- LogStandardErrorAsError="true"
- Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
- </Target>
-
- <Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
- <Exec Command="$(BuildCommand)"
- Condition=" '$(OS)' != 'Windows_NT' " />
-
- <Exec Command="$(BuildCommand)"
- LogStandardErrorAsError="true"
- Condition=" '$(OS)' == 'Windows_NT' " />
- </Target>
-
- <UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
- <ParameterGroup>
- <OutputFilename ParameterType="System.String" Required="true" />
- </ParameterGroup>
- <Task>
- <Reference Include="System.Core" />
- <Using Namespace="System" />
- <Using Namespace="System.IO" />
- <Using Namespace="System.Net" />
- <Using Namespace="Microsoft.Build.Framework" />
- <Using Namespace="Microsoft.Build.Utilities" />
- <Code Type="Fragment" Language="cs">
- <![CDATA[
- try {
- OutputFilename = Path.GetFullPath(OutputFilename);
-
- Log.LogMessage("Downloading latest version of NuGet.exe...");
- WebClient webClient = new WebClient();
- webClient.DownloadFile("https://nuget.org/nuget.exe", OutputFilename);
-
- return true;
- }
- catch (Exception ex) {
- Log.LogErrorFromException(ex);
- return false;
- }
- ]]>
- </Code>
- </Task>
- </UsingTask>
-
- <UsingTask TaskName="SetEnvironmentVariable" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
- <ParameterGroup>
- <EnvKey ParameterType="System.String" Required="true" />
- <EnvValue ParameterType="System.String" Required="true" />
- </ParameterGroup>
- <Task>
- <Using Namespace="System" />
- <Code Type="Fragment" Language="cs">
- <![CDATA[
- try {
- Environment.SetEnvironmentVariable(EnvKey, EnvValue, System.EnvironmentVariableTarget.Process);
- }
- catch {
- }
- ]]>
- </Code>
- </Task>
- </UsingTask>
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
+
+ <!-- Enable the restore command to run before builds -->
+ <RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>
+
+ <!-- Property that enables building a package from a project -->
+ <BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
+
+ <!-- Determines if package restore consent is required to restore packages -->
+ <RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>
+
+ <!-- Download NuGet.exe if it does not already exist -->
+ <DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
+ </PropertyGroup>
+
+ <ItemGroup Condition=" '$(PackageSources)' == '' ">
+ <!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
+ <!-- The official NuGet package source (https://nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
+ <!--
+ <PackageSource Include="https://nuget.org/api/v2/" />
+ <PackageSource Include="https://my-nuget-source/nuget/" />
+ -->
+ </ItemGroup>
+
+ <PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
+ <!-- Windows specific commands -->
+ <NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
+ <PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig>
+ <PackagesDir>$([System.IO.Path]::Combine($(SolutionDir), "packages"))</PackagesDir>
+ </PropertyGroup>
+
+ <PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
+ <!-- We need to launch nuget.exe with the mono command if we're not on windows -->
+ <NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
+ <PackagesConfig>packages.config</PackagesConfig>
+ <PackagesDir>$(SolutionDir)packages</PackagesDir>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <!-- NuGet command -->
+ <NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\nuget.exe</NuGetExePath>
+ <PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
+
+ <NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
+ <NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>
+
+ <PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
+
+ <RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
+ <!-- Commands -->
+ <RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(RequireConsentSwitch) -o "$(PackagesDir)"</RestoreCommand>
+ <BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols</BuildCommand>
+
+ <!-- We need to ensure packages are restored prior to assembly resolve -->
+ <ResolveReferencesDependsOn Condition="$(RestorePackages) == 'true'">
+ RestorePackages;
+ $(ResolveReferencesDependsOn);
+ </ResolveReferencesDependsOn>
+
+ <!-- Make the build depend on restore packages -->
+ <BuildDependsOn Condition="$(BuildPackage) == 'true'">
+ $(BuildDependsOn);
+ BuildPackage;
+ </BuildDependsOn>
+ </PropertyGroup>
+
+ <Target Name="CheckPrerequisites">
+ <!-- Raise an error if we're unable to locate nuget.exe -->
+ <Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
+ <SetEnvironmentVariable EnvKey="VisualStudioVersion" EnvValue="$(VisualStudioVersion)" Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' " />
+ <!--
+ Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
+ This effectively acts as a lock that makes sure that the download operation will only happen once and all
+ parallel builds will have to wait for it to complete.
+ -->
+ <MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT" />
+ </Target>
+
+ <Target Name="_DownloadNuGet">
+ <DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
+ </Target>
+
+ <Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
+ <Exec Command="$(RestoreCommand)"
+ Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
+
+ <Exec Command="$(RestoreCommand)"
+ LogStandardErrorAsError="true"
+ Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
+ </Target>
+
+ <Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
+ <Exec Command="$(BuildCommand)"
+ Condition=" '$(OS)' != 'Windows_NT' " />
+
+ <Exec Command="$(BuildCommand)"
+ LogStandardErrorAsError="true"
+ Condition=" '$(OS)' == 'Windows_NT' " />
+ </Target>
+
+ <UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
+ <ParameterGroup>
+ <OutputFilename ParameterType="System.String" Required="true" />
+ </ParameterGroup>
+ <Task>
+ <Reference Include="System.Core" />
+ <Using Namespace="System" />
+ <Using Namespace="System.IO" />
+ <Using Namespace="System.Net" />
+ <Using Namespace="Microsoft.Build.Framework" />
+ <Using Namespace="Microsoft.Build.Utilities" />
+ <Code Type="Fragment" Language="cs">
+ <![CDATA[
+ try {
+ OutputFilename = Path.GetFullPath(OutputFilename);
+
+ Log.LogMessage("Downloading latest version of NuGet.exe...");
+ WebClient webClient = new WebClient();
+ webClient.DownloadFile("https://nuget.org/nuget.exe", OutputFilename);
+
+ return true;
+ }
+ catch (Exception ex) {
+ Log.LogErrorFromException(ex);
+ return false;
+ }
+ ]]>
+ </Code>
+ </Task>
+ </UsingTask>
+
+ <UsingTask TaskName="SetEnvironmentVariable" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
+ <ParameterGroup>
+ <EnvKey ParameterType="System.String" Required="true" />
+ <EnvValue ParameterType="System.String" Required="true" />
+ </ParameterGroup>
+ <Task>
+ <Using Namespace="System" />
+ <Code Type="Fragment" Language="cs">
+ <![CDATA[
+ try {
+ Environment.SetEnvironmentVariable(EnvKey, EnvValue, System.EnvironmentVariableTarget.Process);
+ }
+ catch {
+ }
+ ]]>
+ </Code>
+ </Task>
+ </UsingTask>
</Project>
View
54 MVC4/PersonaMVC4Example.sln
@@ -1,27 +1,27 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PersonaMVC4Example", "PersonaMVC4Example\PersonaMVC4Example.csproj", "{38A68603-BC0F-4955-A4BD-B9E14BC72A0F}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{B561F3F7-F8ED-409C-A4A5-9A4DAE48DC1B}"
- ProjectSection(SolutionItems) = preProject
- .nuget\NuGet.Config = .nuget\NuGet.Config
- .nuget\NuGet.exe = .nuget\NuGet.exe
- .nuget\NuGet.targets = .nuget\NuGet.targets
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {38A68603-BC0F-4955-A4BD-B9E14BC72A0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {38A68603-BC0F-4955-A4BD-B9E14BC72A0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {38A68603-BC0F-4955-A4BD-B9E14BC72A0F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {38A68603-BC0F-4955-A4BD-B9E14BC72A0F}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PersonaMVC4Example", "PersonaMVC4Example\PersonaMVC4Example.csproj", "{38A68603-BC0F-4955-A4BD-B9E14BC72A0F}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{B561F3F7-F8ED-409C-A4A5-9A4DAE48DC1B}"
+ ProjectSection(SolutionItems) = preProject
+ .nuget\NuGet.Config = .nuget\NuGet.Config
+ .nuget\NuGet.exe = .nuget\NuGet.exe
+ .nuget\NuGet.targets = .nuget\NuGet.targets
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {38A68603-BC0F-4955-A4BD-B9E14BC72A0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {38A68603-BC0F-4955-A4BD-B9E14BC72A0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {38A68603-BC0F-4955-A4BD-B9E14BC72A0F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {38A68603-BC0F-4955-A4BD-B9E14BC72A0F}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
View
BIN  MVC4/PersonaMVC4Example/App_Data/aspnet-PersonaMVC4Example-20120928074626.mdf
Binary file not shown
View
BIN  MVC4/PersonaMVC4Example/App_Data/aspnet-PersonaMVC4Example-20120928074626_log.ldf
Binary file not shown
View
66 MVC4/PersonaMVC4Example/App_Start/AuthConfig.cs
@@ -1,33 +1,33 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Microsoft.Web.WebPages.OAuth;
-using PersonaMVC4Example.Models;
-
-namespace PersonaMVC4Example
-{
- public static class AuthConfig
- {
- public static void RegisterAuth()
- {
- // To let users of this site log in using their accounts from other sites such as Microsoft, Facebook, and Twitter,
- // you must update this site. For more information visit http://go.microsoft.com/fwlink/?LinkID=252166
- OAuthWebSecurity.RegisterClient(new PersonaAuthenticationClient(), "Persona", null);
-
- //OAuthWebSecurity.RegisterMicrosoftClient(
- // clientId: "",
- // clientSecret: "");
-
- //OAuthWebSecurity.RegisterTwitterClient(
- // consumerKey: "",
- // consumerSecret: "");
-
- //OAuthWebSecurity.RegisterFacebookClient(
- // appId: "",
- // appSecret: "");
-
- OAuthWebSecurity.RegisterGoogleClient();
- }
- }
-}
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Web.WebPages.OAuth;
+using PersonaMVC4Example.Models;
+
+namespace PersonaMVC4Example
+{
+ public static class AuthConfig
+ {
+ public static void RegisterAuth()
+ {
+ // To let users of this site log in using their accounts from other sites such as Microsoft, Facebook, and Twitter,
+ // you must update this site. For more information visit http://go.microsoft.com/fwlink/?LinkID=252166
+ OAuthWebSecurity.RegisterClient(new PersonaAuthenticationClient(), "Persona", null);
+
+ //OAuthWebSecurity.RegisterMicrosoftClient(
+ // clientId: "",
+ // clientSecret: "");
+
+ //OAuthWebSecurity.RegisterTwitterClient(
+ // consumerKey: "",
+ // consumerSecret: "");
+
+ //OAuthWebSecurity.RegisterFacebookClient(
+ // appId: "",
+ // appSecret: "");
+
+ OAuthWebSecurity.RegisterGoogleClient();
+ }
+ }
+}
View
50 MVC4/PersonaMVC4Example/Helpers/PersonaAuthenticationClient.cs
@@ -1,26 +1,26 @@
-using DotNetOpenAuth.AspNet;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-
-namespace PersonaMVC4Example
-{
- public class PersonaAuthenticationClient : IAuthenticationClient
- {
- public string ProviderName
- {
- get { return "Persona"; }
- }
-
- public void RequestAuthentication(HttpContextBase context, Uri returnUrl)
- {
- throw new NotImplementedException();
- }
-
- public AuthenticationResult VerifyAuthentication(HttpContextBase context)
- {
- throw new NotImplementedException();
- }
- }
+using DotNetOpenAuth.AspNet;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace PersonaMVC4Example
+{
+ public class PersonaAuthenticationClient : IAuthenticationClient
+ {
+ public string ProviderName
+ {
+ get { return "Persona"; }
+ }
+
+ public void RequestAuthentication(HttpContextBase context, Uri returnUrl)
+ {
+ throw new NotImplementedException();
+ }
+
+ public AuthenticationResult VerifyAuthentication(HttpContextBase context)
+ {
+ throw new NotImplementedException();
+ }
+ }
}
View
3  MVC4/PersonaMVC4Example/PersonaMVC4Example.csproj
@@ -20,6 +20,9 @@
<IISExpressAnonymousAuthentication>enabled</IISExpressAnonymousAuthentication>
<IISExpressWindowsAuthentication>enabled</IISExpressWindowsAuthentication>
<IISExpressUseClassicPipelineMode>false</IISExpressUseClassicPipelineMode>
+ <IISExpressAnonymousAuthentication />
+ <IISExpressWindowsAuthentication />
+ <IISExpressUseClassicPipelineMode />
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
View
60 MVC4/PersonaMVC4Example/PersonaMVC4Example.csproj.user
@@ -1,31 +1,31 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <ProjectView>ShowAllFiles</ProjectView>
- </PropertyGroup>
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
- <WebProjectProperties>
- <StartPageUrl>
- </StartPageUrl>
- <StartAction>SpecificPage</StartAction>
- <AspNetDebugging>True</AspNetDebugging>
- <SilverlightDebugging>False</SilverlightDebugging>
- <NativeDebugging>False</NativeDebugging>
- <SQLDebugging>False</SQLDebugging>
- <ExternalProgram>
- </ExternalProgram>
- <StartExternalURL>
- </StartExternalURL>
- <StartCmdLineArguments>
- </StartCmdLineArguments>
- <StartWorkingDirectory>
- </StartWorkingDirectory>
- <EnableENC>False</EnableENC>
- <AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
- </WebProjectProperties>
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectView>ShowAllFiles</ProjectView>
+ </PropertyGroup>
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
+ <WebProjectProperties>
+ <StartPageUrl>
+ </StartPageUrl>
+ <StartAction>SpecificPage</StartAction>
+ <AspNetDebugging>True</AspNetDebugging>
+ <SilverlightDebugging>False</SilverlightDebugging>
+ <NativeDebugging>False</NativeDebugging>
+ <SQLDebugging>False</SQLDebugging>
+ <ExternalProgram>
+ </ExternalProgram>
+ <StartExternalURL>
+ </StartExternalURL>
+ <StartCmdLineArguments>
+ </StartCmdLineArguments>
+ <StartWorkingDirectory>
+ </StartWorkingDirectory>
+ <EnableENC>False</EnableENC>
+ <AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
+ </WebProjectProperties>
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
</Project>
View
66 MVC4/PersonaMVC4Example/Views/Account/_ExternalLoginsListPartial.cshtml
@@ -1,33 +1,33 @@
-@model ICollection<AuthenticationClientData>
-
-@if (Model.Count == 0)
-{
- <div class="message-info">
- <p>There are no external authentication services configured. See <a href="http://go.microsoft.com/fwlink/?LinkId=252166">this article</a>
- for details on setting up this ASP.NET application to support logging in via external services.</p>
- </div>
-}
-else
-{
- using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = ViewBag.ReturnUrl }))
- {
- @Html.AntiForgeryToken()
- <fieldset id="socialLoginList">
- <legend>Log in using another service</legend>
- <p>
- @foreach (AuthenticationClientData p in Model)
- {
- if(p.AuthenticationClient.ProviderName == "Persona") //ya, ya, I know. I wanted cool buttons
- {
- if (!Request.IsAuthenticated) {
- <p><a href="#" class="persona-button" id="personasignin"><span>Sign in with your Email</span></a></p>
- }
- <!-- The CSS for this is in persona-buttons.css and is bundled in in BundleConfig.cs -->
- }else{
- <button type="submit" name="provider" value="@p.AuthenticationClient.ProviderName" title="Log in using your @p.DisplayName account">@p.DisplayName</button>
- }
- }
- </p>
- </fieldset>
- }
-}
+@model ICollection<AuthenticationClientData>
+
+@if (Model.Count == 0)
+{
+ <div class="message-info">
+ <p>There are no external authentication services configured. See <a href="http://go.microsoft.com/fwlink/?LinkId=252166">this article</a>
+ for details on setting up this ASP.NET application to support logging in via external services.</p>
+ </div>
+}
+else
+{
+ using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = ViewBag.ReturnUrl }))
+ {
+ @Html.AntiForgeryToken()
+ <fieldset id="socialLoginList">
+ <legend>Log in using another service</legend>
+ <p>
+ @foreach (AuthenticationClientData p in Model)
+ {
+ if(p.AuthenticationClient.ProviderName == "Persona") //ya, ya, I know. I wanted cool buttons
+ {
+ if (!Request.IsAuthenticated) {
+ <p><a href="#" class="persona-button" id="personasignin"><span>Sign in with your Email</span></a></p>
+ }
+ <!-- The CSS for this is in persona-buttons.css and is bundled in in BundleConfig.cs -->
+ }else{
+ <button type="submit" name="provider" value="@p.AuthenticationClient.ProviderName" title="Log in using your @p.DisplayName account">@p.DisplayName</button>
+ }
+ }
+ </p>
+ </fieldset>
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.