This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using Nancy; | |
namespace SimpleAuthNancyExample.Modules | |
{ | |
public class HomeModule : NancyModule | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Http; | |
using System.Web.Mvc; | |
using System.Web.Optimization; | |
using System.Web.Routing; | |
using Autofac; | |
using Autofac.Integration.Mvc; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model SimpleAuthAutofacExample.Models.AuthenticateCallbackViewModel | |
<h1>AuthenticateCallback</h1> | |
@if (Model.Exception != null) | |
{ | |
<h2>Error Information</h2> | |
<p>>Message: @Model.Exception.Message<br /> | |
</p> | |
<p>StackTrace: @Model.Exception.StackTrace</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
namespace SimpleAuthAutofacExample.Models | |
{ | |
public class IndexViewModel | |
{ | |
public string ErrorMessage { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using SimpleAuthentication.Core; | |
namespace SimpleAuthAutofacExample.Models | |
{ | |
public class AuthenticateCallbackViewModel | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@using SimpleAuthentication.Mvc | |
@{ | |
ViewBag.Title = "Index"; | |
} | |
<h2>Index</h2> | |
<p>Welcome to SimpleAuthAutofacExample</p> | |
<br /><br /> | |
<a href="@Url.RedirectToProvider("facebook")">Login to Facebook</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Mvc; | |
using SimpleAuthAutofacExample.Models; | |
using SimpleAuthentication.Mvc; | |
namespace SimpleAuthAutofacExample | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kernel.Bind<SimpleAuthentication.Mvc.IAuthenticationCallbackProvider>() | |
.To<SimpleAuthNinjectExample.SimpleAuthenticationCallbackHandler>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@using SimpleAuthentication.Mvc | |
@{ | |
ViewBag.Title = "Index"; | |
} | |
<h2>Index</h2> | |
<p>Welcome to SimpleAuthNinjectExample</p> | |
<br /><br /> | |
<a href="@Url.RedirectToProvider("facebook")">Login to Facebook</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Mvc; | |
using SimpleAuthentication.Mvc; | |
using SimpleAuthNinjectExample.Models; | |
namespace SimpleAuthNinjectExample | |
{ |