Skip to content

Instantly share code, notes, and snippets.

View richardprice's full-sized avatar

Richard Price richardprice

View GitHub Profile
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace SimpleAuthNinjectExample.Models
{
public class IndexViewModel
{
public string ErrorMessage { get; set; }
using System;
using SimpleAuthentication.Core;
namespace SimpleAuthNinjectExample.Models
{
public class AuthenticateCallbackViewModel
{
public IAuthenticatedClient AuthenticatedClient { get; set; }
public Exception Exception { get; set; }
public string ReturnUrl { get; set; }
@model SimpleAuthNinjectExample.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>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using SimpleAuthentication.Mvc;
using SimpleAuthNinjectExample.Models;
namespace SimpleAuthNinjectExample
{
@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>
kernel.Bind<SimpleAuthentication.Mvc.IAuthenticationCallbackProvider>()
.To<SimpleAuthNinjectExample.SimpleAuthenticationCallbackHandler>();
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using SimpleAuthAutofacExample.Models;
using SimpleAuthentication.Mvc;
namespace SimpleAuthAutofacExample
{
@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>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using SimpleAuthentication.Core;
namespace SimpleAuthAutofacExample.Models
{
public class AuthenticateCallbackViewModel
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace SimpleAuthAutofacExample.Models
{
public class IndexViewModel
{
public string ErrorMessage { get; set; }