Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dc326e4
commit 49ef78c
Showing
4 changed files
with
43 additions
and
53 deletions.
There are no files selected for viewing
This file contains 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
53 changes: 30 additions & 23 deletions
53
samples/Microsoft.AspNet.SignalR.Hosting.AspNet.Samples/Hubs/Auth/Default.aspx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,31 @@ | ||
<%@ Page Title="SignalR Auth Sample" Language="C#" AutoEventWireup="true" | ||
CodeBehind="Default.aspx.cs" Inherits="Microsoft.AspNet.SignalR.Samples.Hubs.Auth._Default" %> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Auth Sample</title> | ||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" /> | ||
<script src="../../Scripts/signalr.samples.js" type="text/javascript"></script> | ||
<script src="../../Scripts/jquery-1.6.4.min.js" type="text/javascript"></script> | ||
<script src="../../Scripts/json2.min.js" type="text/javascript"></script> | ||
<script src="../../Scripts/jquery.signalR.js" type="text/javascript"></script> | ||
<script src="../../signalr/hubs" type="text/javascript"></script> | ||
<script src="Auth.js" type="text/javascript"></script> | ||
</head> | ||
<body> | ||
<form runat="server"> | ||
<asp:Label ID="userNameLabel" AssociatedControlID="userName" Text="User Name: " runat="server" /> | ||
<asp:TextBox ID="userName" runat="server" /> | ||
<asp:Label ID="rolesLabel" AssociatedControlID="roles" Text="Roles: " runat="server" /> | ||
<asp:TextBox ID ="roles" runat="server" /> | ||
<asp:Button ID="login" runat="server" Text="login" OnClick="Login" /> | ||
<%@ Page Title="SignalR Auth Sample" Language="C#" MasterPageFile="~/SignalR.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Microsoft.AspNet.SignalR.Samples.Hubs.Auth._Default" %> | ||
|
||
<asp:Content ContentPlaceHolderID="MainContent" runat="server"> | ||
<ul class="breadcrumb"> | ||
<li><a href="<%: ResolveUrl("~/") %>">SignalR Samples</a> <span class="divider">/</span></li> | ||
<li class="active">Hub Authorization</li> | ||
</ul> | ||
|
||
<div class="page-header"> | ||
<h2>Hub Authorization <small>Protect hubs and hub methods</small></h2> | ||
<p>Demonstrates how to use the authorization features of the Hub API to restrict certain Hubs and methods to specific users.</p> | ||
</div> | ||
|
||
<form runat="server" class="form-inline"> | ||
<asp:Label runat="server" AssociatedControlID="userName" Text="User Name:" /> | ||
<asp:TextBox ID="userName" runat="server" placeholder="Enter 'User'" /> | ||
|
||
<asp:Label runat="server" AssociatedControlID="roles" Text="Roles:" /> | ||
<asp:TextBox ID ="roles" runat="server" placeholder="Enter 'Invoker' or 'Admin'" /> | ||
|
||
<asp:Button runat="server" ID="login" CssClass="btn" Text="Log in" OnClick="Login" /> | ||
</form> | ||
</body> | ||
</html> | ||
|
||
<div id="messages"> | ||
</div> | ||
</asp:Content> | ||
|
||
<asp:Content ContentPlaceHolderID="Scripts" runat="server"> | ||
<script src="<%: ResolveUrl("~/signalr/hubs") %>"></script> | ||
<script src="Auth.js"></script> | ||
</asp:Content> |
This file contains 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
20 changes: 1 addition & 19 deletions
20
samples/Microsoft.AspNet.SignalR.Hosting.AspNet.Samples/Hubs/Auth/Default.aspx.designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.