Skip to content

Instantly share code, notes, and snippets.

@richardprice
Created August 23, 2013 16:56
Show Gist options
  • Save richardprice/6321563 to your computer and use it in GitHub Desktop.
Save richardprice/6321563 to your computer and use it in GitHub Desktop.
@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>
}
else
{
<h2>User Information</h2>
<p>Provider Type: @Model.AuthenticatedClient.ProviderName</p>
<p>Public Access Token: @Model.AuthenticatedClient.AccessToken.PublicToken</p>
<p>Secret Access Token: @Model.AuthenticatedClient.AccessToken.SecretToken</p>
<p>Access Token Expires On: @Model.AuthenticatedClient.AccessToken.ExpiresOn</p>
<p>ID: @Model.AuthenticatedClient.UserInformation.Id</p>
<p>Name: @Model.AuthenticatedClient.UserInformation.Name</p>
<p>UserName: @Model.AuthenticatedClient.UserInformation.UserName</p>
<p>Email: @(string.IsNullOrEmpty(Model.AuthenticatedClient.UserInformation.Email) ? "- none provided -" : Model.AuthenticatedClient.UserInformation.Email)</p>
<p>Locale: @Model.AuthenticatedClient.UserInformation.Locale</p>
if (!string.IsNullOrEmpty(Model.AuthenticatedClient.UserInformation.Picture))
{
<p>Picture:<br />
<img alt="Provider Image" src="@Model.AuthenticatedClient.UserInformation.Picture" /></p>
}
<p>Gender: @Model.AuthenticatedClient.UserInformation.Gender.ToString()</p>
<p>Referrer/RedirectTo Url: @(Model.ReturnUrl == null ? "-none/null-" : Model.ReturnUrl)</p>
}
@Html.ActionLink("Lets go back home.", "Index", "Home")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment