Skip to content

Instantly share code, notes, and snippets.

@richardprice
Last active December 23, 2015 06:49
Show Gist options
  • Save richardprice/6596869 to your computer and use it in GitHub Desktop.
Save richardprice/6596869 to your computer and use it in GitHub Desktop.
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<dynamic>
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<title>Client Details</title>
<link rel="stylesheet" type="text/css" href="/Content/main.css" />
</head>
<body>
<div id="usercontainer">
<h1>Authenticated Client</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 ?? "-none/null-")</p>
}
<p align="center"><a href="/">Lets go back home.</a></p>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment