summaryrefslogtreecommitdiffstats
path: root/src/OpenID/OpenIdRelyingPartyWebFormsVB
diff options
context:
space:
mode:
Diffstat (limited to 'src/OpenID/OpenIdRelyingPartyWebFormsVB')
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/Code/State.vb46
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/Code/TracePageAppender.vb10
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/Default.aspx18
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/Default.aspx.designer.vb26
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/Default.aspx.vb8
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/Global.asax1
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/Global.asax.vb65
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/Login.aspx28
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/Login.aspx.designer.vb53
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/Login.aspx.vb52
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/LoginProgrammatic.aspx15
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/LoginProgrammatic.aspx.designer.vb71
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/LoginProgrammatic.aspx.vb76
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/MembersOnly/Default.aspx34
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/MembersOnly/ProfileFieldsDisplay.ascx91
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/MembersOnly/Web.config18
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/Application.Designer.vb13
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/Application.myapp10
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/AssemblyInfo.vb34
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/MyExtensions/MyWebExtension.vb73
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/Resources.Designer.vb63
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/Resources.resx117
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/Settings.Designer.vb73
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/Settings.settings7
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/OpenIdRelyingPartyWebFormsVB.vbproj245
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/PrivacyPolicy.aspx7
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/Site.Master39
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/TracePage.aspx16
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/TracePage.aspx.designer.vb53
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/TracePage.aspx.vb13
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/Web.config127
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/favicon.icobin0 -> 1150 bytes
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/images/DotNetOpenAuth.pngbin0 -> 25212 bytes
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/images/attention.pngbin0 -> 714 bytes
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/images/openid_login.pngbin0 -> 457 bytes
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/images/yahoo.pngbin0 -> 7607 bytes
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/packages.config11
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/styles.css10
-rw-r--r--src/OpenID/OpenIdRelyingPartyWebFormsVB/xrds.aspx29
39 files changed, 1552 insertions, 0 deletions
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/Code/State.vb b/src/OpenID/OpenIdRelyingPartyWebFormsVB/Code/State.vb
new file mode 100644
index 0000000..e00cb4f
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/Code/State.vb
@@ -0,0 +1,46 @@
+Imports DotNetOpenAuth.OpenId.Extensions.ProviderAuthenticationPolicy
+Imports DotNetOpenAuth.OpenId.Extensions.SimpleRegistration
+Imports DotNetOpenAuth.OpenId.Extensions.AttributeExchange
+
+Public Class State
+ Public Shared Property ProfileFields() As ClaimsResponse
+ Get
+ Return HttpContext.Current.Session("ProfileFields")
+ End Get
+ Set(ByVal value As ClaimsResponse)
+ HttpContext.Current.Session("ProfileFields") = value
+ End Set
+ End Property
+
+ Public Shared Property FetchResponse() As FetchResponse
+ Get
+ Return HttpContext.Current.Session("FetchResponse")
+ End Get
+ Set(ByVal value As FetchResponse)
+ HttpContext.Current.Session("FetchResponse") = value
+ End Set
+ End Property
+
+ Public Shared Property FriendlyLoginName() As String
+ Get
+ Return HttpContext.Current.Session("FriendlyLoginName")
+ End Get
+ Set(ByVal value As String)
+ HttpContext.Current.Session("FriendlyLoginName") = value
+ End Set
+ End Property
+
+ Public Shared Property PapePolicies() As PolicyResponse
+ Get
+ Return HttpContext.Current.Session("PapePolicies")
+ End Get
+ Set(ByVal value As PolicyResponse)
+ HttpContext.Current.Session("PapePolicies") = value
+ End Set
+ End Property
+
+ Public Shared Sub Clear()
+ FriendlyLoginName = Nothing
+ End Sub
+
+End Class
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/Code/TracePageAppender.vb b/src/OpenID/OpenIdRelyingPartyWebFormsVB/Code/TracePageAppender.vb
new file mode 100644
index 0000000..dfc2db5
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/Code/TracePageAppender.vb
@@ -0,0 +1,10 @@
+Imports System.IO
+
+Public Class TracePageAppender
+ Inherits log4net.Appender.AppenderSkeleton
+
+ Protected Overrides Sub Append(ByVal loggingEvent As log4net.Core.LoggingEvent)
+ Dim sw As StringWriter = New StringWriter(Global_asax.LogMessages)
+ Layout.Format(sw, loggingEvent)
+ End Sub
+End Class \ No newline at end of file
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/Default.aspx b/src/OpenID/OpenIdRelyingPartyWebFormsVB/Default.aspx
new file mode 100644
index 0000000..12ccfd0
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/Default.aspx
@@ -0,0 +1,18 @@
+<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="OpenIdRelyingPartyWebFormsVB._Default"
+ MasterPageFile="~/Site.Master" %>
+
+<%@ Register Assembly="DotNetOpenAuth.OpenId.UI" Namespace="DotNetOpenAuth" TagPrefix="openid" %>
+<asp:Content runat="server" ContentPlaceHolderID="head">
+ <openid:XrdsPublisher ID="XrdsPublisher1" runat="server" XrdsUrl="~/xrds.aspx" />
+</asp:Content>
+<asp:Content runat="server" ContentPlaceHolderID="main">
+ <h2>
+ Relying Party
+ </h2>
+ <p>
+ Visit the
+ <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/MembersOnly/Default.aspx"
+ Text="Members Only" />
+ area. (This will trigger a login demo).
+ </p>
+</asp:Content>
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/Default.aspx.designer.vb b/src/OpenID/OpenIdRelyingPartyWebFormsVB/Default.aspx.designer.vb
new file mode 100644
index 0000000..ce59c43
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/Default.aspx.designer.vb
@@ -0,0 +1,26 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+' This code was generated by a tool.
+' Runtime Version:2.0.50727.4927
+'
+' Changes to this file may cause incorrect behavior and will be lost if
+' the code is regenerated.
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+
+
+Partial Public Class _Default
+
+ '''<summary>
+ '''form1 control.
+ '''</summary>
+ '''<remarks>
+ '''Auto-generated field.
+ '''To modify move field declaration from designer file to code-behind file.
+ '''</remarks>
+ Protected WithEvents form1 As Global.System.Web.UI.HtmlControls.HtmlForm
+End Class
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/Default.aspx.vb b/src/OpenID/OpenIdRelyingPartyWebFormsVB/Default.aspx.vb
new file mode 100644
index 0000000..3e023c0
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/Default.aspx.vb
@@ -0,0 +1,8 @@
+Partial Public Class _Default
+ Inherits System.Web.UI.Page
+
+ Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
+
+ End Sub
+
+End Class \ No newline at end of file
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/Global.asax b/src/OpenID/OpenIdRelyingPartyWebFormsVB/Global.asax
new file mode 100644
index 0000000..92716f1
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/Global.asax
@@ -0,0 +1 @@
+<%@ Application Codebehind="Global.asax.vb" Inherits="OpenIdRelyingPartyWebFormsVB.Global_asax" Language="vb" %>
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/Global.asax.vb b/src/OpenID/OpenIdRelyingPartyWebFormsVB/Global.asax.vb
new file mode 100644
index 0000000..257e11a
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/Global.asax.vb
@@ -0,0 +1,65 @@
+Imports System
+Imports System.Collections.Specialized
+Imports System.Configuration
+Imports System.IO
+Imports System.Text
+Imports System.Web
+Imports DotNetOpenAuth.ApplicationBlock
+Imports OpenIdRelyingPartyWebFormsVB
+
+Public Class Global_asax
+ Inherits HttpApplication
+
+ Public Shared Logger As log4net.ILog = log4net.LogManager.GetLogger(GetType(Global_asax))
+
+ Friend Shared LogMessages As StringBuilder = New StringBuilder
+
+ Public Shared Function CollectionToString(ByVal collection As NameValueCollection) As String
+ Dim sw As StringWriter = New StringWriter
+ For Each key As String In collection.Keys
+ sw.WriteLine("{0} = '{1}'", key, collection(key))
+ Next
+ Return sw.ToString
+ End Function
+
+ Protected Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
+ log4net.Config.XmlConfigurator.Configure()
+ Logger.Info("Sample starting...")
+ End Sub
+
+ Protected Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)
+ Logger.Info("Sample shutting down...")
+ ' this would be automatic, but in partial trust scenarios it is not.
+ log4net.LogManager.Shutdown()
+ End Sub
+
+ Protected Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
+ ' System.Diagnostics.Debugger.Launch();
+ Logger.DebugFormat("Processing {0} on {1} ", Request.HttpMethod, stripQueryString(Request.Url))
+ If (Request.QueryString.Count > 0) Then
+ Logger.DebugFormat("Querystring follows: " & vbLf & "{0}", CollectionToString(Request.QueryString))
+ End If
+ If (Request.Form.Count > 0) Then
+ Logger.DebugFormat("Posted form follows: " & vbLf & "{0}", CollectionToString(Request.Form))
+ End If
+ End Sub
+
+ Protected Sub Application_AuthenticateRequest(ByVal sender As Object, ByVal e As EventArgs)
+ Logger.DebugFormat("User {0} authenticated.", (Not (HttpContext.Current.User) Is Nothing))
+ 'TODO: Warning!!!, inline IF is not supported ?
+ End Sub
+
+ Protected Sub Application_EndRequest(ByVal sender As Object, ByVal e As EventArgs)
+
+ End Sub
+
+ Protected Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
+ Logger.ErrorFormat("An unhandled exception was raised. Details follow: {0}", HttpContext.Current.Server.GetLastError)
+ End Sub
+
+ Private Shared Function stripQueryString(ByVal uri As Uri) As String
+ Dim builder As UriBuilder = New UriBuilder(uri)
+ builder.Query = Nothing
+ Return builder.ToString
+ End Function
+End Class \ No newline at end of file
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/Login.aspx b/src/OpenID/OpenIdRelyingPartyWebFormsVB/Login.aspx
new file mode 100644
index 0000000..c28611e
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/Login.aspx
@@ -0,0 +1,28 @@
+<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Login.aspx.vb" Inherits="OpenIdRelyingPartyWebFormsVB.Login"
+ ValidateRequest="false" MasterPageFile="~/Site.Master" %>
+
+<%@ Register Assembly="DotNetOpenAuth.OpenId.RelyingParty.UI" Namespace="DotNetOpenAuth.OpenId.RelyingParty" TagPrefix="rp" %>
+<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="Main">
+ <h2>Login Page </h2>
+ <rp:OpenIdLogin ID="OpenIdLogin1" runat="server" CssClass="openid_login" RequestCountry="Request"
+ RequestEmail="Require" RequestGender="Require" RequestPostalCode="Require" RequestTimeZone="Require"
+ RememberMeVisible="True" PolicyUrl="~/PrivacyPolicy.aspx" TabIndex="1" />
+ <fieldset title="Knobs">
+ <asp:CheckBox ID="requireSslCheckBox" runat="server"
+ Text="RequireSsl (high security) mode"
+ oncheckedchanged="requireSslCheckBox_CheckedChanged" /><br />
+ <h4 style="margin-top: 0; margin-bottom: 0">PAPE policies</h4>
+ <asp:CheckBoxList runat="server" ID="papePolicies">
+ <asp:ListItem Text="Request phishing resistant authentication" Value="http://schemas.openid.net/pape/policies/2007/06/phishing-resistant" />
+ <asp:ListItem Text="Request multi-factor authentication" Value="http://schemas.openid.net/pape/policies/2007/06/multi-factor" />
+ <asp:ListItem Text="Request physical multi-factor authentication" Value="http://schemas.openid.net/pape/policies/2007/06/multi-factor-physical" />
+ <asp:ListItem Text="Request PPID identifier" Value="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/privatepersonalidentifier" />
+ </asp:CheckBoxList>
+ <p>Try the PPID identifier functionality against the OpenIDProviderMvc sample.</p>
+ </fieldset>
+ <p><a href="loginGoogleApps.aspx">Log in using Google Apps for Domains</a>. </p>
+ <p>
+ <rp:OpenIdButton runat="server" ImageUrl="~/images/yahoo.png" Text="Login with Yahoo!" ID="yahooLoginButton"
+ Identifier="https://me.yahoo.com/" OnLoggingIn="OpenIdLogin1_LoggingIn" OnLoggedIn="OpenIdLogin1_LoggedIn" />
+ </p>
+</asp:Content>
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/Login.aspx.designer.vb b/src/OpenID/OpenIdRelyingPartyWebFormsVB/Login.aspx.designer.vb
new file mode 100644
index 0000000..4cf1a96
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/Login.aspx.designer.vb
@@ -0,0 +1,53 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+' This code was generated by a tool.
+' Runtime Version:2.0.50727.4927
+'
+' Changes to this file may cause incorrect behavior and will be lost if
+' the code is regenerated.
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+
+
+Partial Public Class Login
+
+ '''<summary>
+ '''OpenIdLogin1 control.
+ '''</summary>
+ '''<remarks>
+ '''Auto-generated field.
+ '''To modify move field declaration from designer file to code-behind file.
+ '''</remarks>
+ Protected WithEvents OpenIdLogin1 As Global.DotNetOpenAuth.OpenId.RelyingParty.OpenIdLogin
+
+ '''<summary>
+ '''requireSslCheckBox control.
+ '''</summary>
+ '''<remarks>
+ '''Auto-generated field.
+ '''To modify move field declaration from designer file to code-behind file.
+ '''</remarks>
+ Protected WithEvents requireSslCheckBox As Global.System.Web.UI.WebControls.CheckBox
+
+ '''<summary>
+ '''papePolicies control.
+ '''</summary>
+ '''<remarks>
+ '''Auto-generated field.
+ '''To modify move field declaration from designer file to code-behind file.
+ '''</remarks>
+ Protected WithEvents papePolicies As Global.System.Web.UI.WebControls.CheckBoxList
+
+ '''<summary>
+ '''yahooLoginButton control.
+ '''</summary>
+ '''<remarks>
+ '''Auto-generated field.
+ '''To modify move field declaration from designer file to code-behind file.
+ '''</remarks>
+ Protected WithEvents yahooLoginButton As Global.DotNetOpenAuth.OpenId.RelyingParty.OpenIdButton
+End Class
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/Login.aspx.vb b/src/OpenID/OpenIdRelyingPartyWebFormsVB/Login.aspx.vb
new file mode 100644
index 0000000..339f62c
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/Login.aspx.vb
@@ -0,0 +1,52 @@
+Imports DotNetOpenAuth.OpenId.Extensions.ProviderAuthenticationPolicy
+Imports DotNetOpenAuth.OpenId.RelyingParty
+Imports DotNetOpenAuth.OpenId.Extensions.SimpleRegistration
+
+Partial Public Class Login
+ Inherits System.Web.UI.Page
+
+ Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
+ OpenIdLogin1.Focus()
+ End Sub
+
+ Protected Sub requireSslCheckBox_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs)
+ OpenIdLogin1.RequireSsl = requireSslCheckBox.Checked
+ End Sub
+
+ Protected Sub OpenIdLogin1_LoggingIn(ByVal sender As Object, ByVal e As DotNetOpenAuth.OpenId.RelyingParty.OpenIdEventArgs) Handles OpenIdLogin1.LoggingIn
+ prepareRequest(e.Request)
+ End Sub
+
+ ''' <summary>
+ ''' Fired upon login.
+ ''' </summary>
+ ''' <param name="sender">The source of the event.</param>
+ ''' <param name="e">The <see cref="DotNetOpenAuth.OpenId.RelyingParty.OpenIdEventArgs"/> instance containing the event data.</param>
+ ''' <remarks>
+ ''' Note, that straight after login, forms auth will redirect the user
+ ''' to their original page. So this page may never be rendererd.
+ ''' </remarks>
+ Protected Sub OpenIdLogin1_LoggedIn(ByVal sender As Object, ByVal e As DotNetOpenAuth.OpenId.RelyingParty.OpenIdEventArgs) Handles OpenIdLogin1.LoggedIn
+ State.FriendlyLoginName = e.Response.FriendlyIdentifierForDisplay
+ State.ProfileFields = e.Response.GetExtension(Of ClaimsResponse)()
+ State.PapePolicies = e.Response.GetExtension(Of PolicyResponse)()
+ End Sub
+
+ Private Sub prepareRequest(ByVal request As IAuthenticationRequest)
+ ' Collect the PAPE policies requested by the user.
+ Dim policies As New List(Of String)
+ For Each item As ListItem In Me.papePolicies.Items
+ If item.Selected Then
+ policies.Add(item.Value)
+ End If
+ Next
+ ' Add the PAPE extension if any policy was requested.
+ If (policies.Count > 0) Then
+ Dim pape As New PolicyRequest
+ For Each policy As String In policies
+ pape.PreferredPolicies.Add(policy)
+ Next
+ request.AddExtension(pape)
+ End If
+ End Sub
+End Class \ No newline at end of file
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/LoginProgrammatic.aspx b/src/OpenID/OpenIdRelyingPartyWebFormsVB/LoginProgrammatic.aspx
new file mode 100644
index 0000000..7f1fa0e
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/LoginProgrammatic.aspx
@@ -0,0 +1,15 @@
+<%@ Page Language="vb" AutoEventWireup="true" CodeBehind="loginProgrammatic.aspx.vb"
+ Inherits="OpenIdRelyingPartyWebFormsVB.LoginProgrammatic" MasterPageFile="~/Site.Master" %>
+<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="Main">
+ <h2>Login Page </h2>
+ <asp:Label ID="Label1" runat="server" Text="OpenID Login" />
+ <asp:TextBox ID="openIdBox" runat="server" />
+ <asp:Button ID="loginButton" runat="server" Text="Login" OnClick="loginButton_Click" />
+ <asp:CustomValidator runat="server" ID="openidValidator" ErrorMessage="Invalid OpenID Identifier"
+ ControlToValidate="openIdBox" EnableViewState="false" OnServerValidate="openidValidator_ServerValidate" />
+ <br />
+ <asp:Label ID="loginFailedLabel" runat="server" EnableViewState="False" Text="Login failed"
+ Visible="False" />
+ <asp:Label ID="loginCanceledLabel" runat="server" EnableViewState="False" Text="Login canceled"
+ Visible="False" />
+</asp:Content> \ No newline at end of file
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/LoginProgrammatic.aspx.designer.vb b/src/OpenID/OpenIdRelyingPartyWebFormsVB/LoginProgrammatic.aspx.designer.vb
new file mode 100644
index 0000000..907fcda
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/LoginProgrammatic.aspx.designer.vb
@@ -0,0 +1,71 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+' This code was generated by a tool.
+' Runtime Version:2.0.50727.4927
+'
+' Changes to this file may cause incorrect behavior and will be lost if
+' the code is regenerated.
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+
+
+Partial Public Class LoginProgrammatic
+
+ '''<summary>
+ '''Label1 control.
+ '''</summary>
+ '''<remarks>
+ '''Auto-generated field.
+ '''To modify move field declaration from designer file to code-behind file.
+ '''</remarks>
+ Protected WithEvents Label1 As Global.System.Web.UI.WebControls.Label
+
+ '''<summary>
+ '''openIdBox control.
+ '''</summary>
+ '''<remarks>
+ '''Auto-generated field.
+ '''To modify move field declaration from designer file to code-behind file.
+ '''</remarks>
+ Protected WithEvents openIdBox As Global.System.Web.UI.WebControls.TextBox
+
+ '''<summary>
+ '''loginButton control.
+ '''</summary>
+ '''<remarks>
+ '''Auto-generated field.
+ '''To modify move field declaration from designer file to code-behind file.
+ '''</remarks>
+ Protected WithEvents loginButton As Global.System.Web.UI.WebControls.Button
+
+ '''<summary>
+ '''openidValidator control.
+ '''</summary>
+ '''<remarks>
+ '''Auto-generated field.
+ '''To modify move field declaration from designer file to code-behind file.
+ '''</remarks>
+ Protected WithEvents openidValidator As Global.System.Web.UI.WebControls.CustomValidator
+
+ '''<summary>
+ '''loginFailedLabel control.
+ '''</summary>
+ '''<remarks>
+ '''Auto-generated field.
+ '''To modify move field declaration from designer file to code-behind file.
+ '''</remarks>
+ Protected WithEvents loginFailedLabel As Global.System.Web.UI.WebControls.Label
+
+ '''<summary>
+ '''loginCanceledLabel control.
+ '''</summary>
+ '''<remarks>
+ '''Auto-generated field.
+ '''To modify move field declaration from designer file to code-behind file.
+ '''</remarks>
+ Protected WithEvents loginCanceledLabel As Global.System.Web.UI.WebControls.Label
+End Class
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/LoginProgrammatic.aspx.vb b/src/OpenID/OpenIdRelyingPartyWebFormsVB/LoginProgrammatic.aspx.vb
new file mode 100644
index 0000000..6cac182
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/LoginProgrammatic.aspx.vb
@@ -0,0 +1,76 @@
+Imports System.Net
+Imports System.Web.Security
+Imports DotNetOpenAuth.Messaging
+Imports DotNetOpenAuth.OpenId
+Imports DotNetOpenAuth.OpenId.Extensions.SimpleRegistration
+Imports DotNetOpenAuth.OpenId.RelyingParty
+
+Public Class LoginProgrammatic
+ Inherits System.Web.UI.Page
+
+ Private Shared relyingParty As New OpenIdRelyingParty
+
+ Protected Sub openidValidator_ServerValidate(ByVal source As Object, ByVal args As ServerValidateEventArgs)
+ ' This catches common typos that result in an invalid OpenID Identifier.
+ args.IsValid = Identifier.IsValid(args.Value)
+ End Sub
+
+ Protected Sub loginButton_Click(ByVal sender As Object, ByVal e As EventArgs)
+ If Not Me.Page.IsValid Then
+ Return
+ ' don't login if custom validation failed.
+ End If
+ Try
+ Dim request As IAuthenticationRequest = relyingParty.CreateRequest(Me.openIdBox.Text)
+ ' This is where you would add any OpenID extensions you wanted
+ ' to include in the authentication request.
+ request.AddExtension(New ClaimsRequest() With { _
+ .Country = DemandLevel.Request, _
+ .Email = DemandLevel.Request, _
+ .Gender = DemandLevel.Require, _
+ .PostalCode = DemandLevel.Require, _
+ .TimeZone = DemandLevel.Require _
+ })
+ ' Send your visitor to their Provider for authentication.
+ request.RedirectToProvider()
+ Catch ex As ProtocolException
+ ' The user probably entered an Identifier that
+ ' was not a valid OpenID endpoint.
+ Me.openidValidator.Text = ex.Message
+ Me.openidValidator.IsValid = False
+ End Try
+ End Sub
+
+ Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
+ Me.openIdBox.Focus()
+ ' For debugging/testing, we allow remote clearing of all associations...
+ ' NOT a good idea on a production site.
+ If (Request.QueryString("clearAssociations") = "1") Then
+ Application.Remove("DotNetOpenAuth.OpenId.RelyingParty.OpenIdRelyingParty.ApplicationStore")
+ ' Force a redirect now to prevent the user from logging in while associations
+ ' are constantly being cleared.
+ Dim builder As UriBuilder = New UriBuilder(Request.Url)
+ builder.Query = Nothing
+ Me.Response.Redirect(builder.Uri.AbsoluteUri)
+ End If
+ Dim response As IAuthenticationResponse = relyingParty.GetResponse
+ If response IsNot Nothing Then
+ Select Case response.Status
+ Case AuthenticationStatus.Authenticated
+ ' This is where you would look for any OpenID extension responses included
+ ' in the authentication assertion.
+ Dim claimsResponse As ClaimsResponse = response.GetExtension(Of ClaimsResponse)()
+ State.ProfileFields = claimsResponse
+ ' Store off the "friendly" username to display -- NOT for username lookup
+ State.FriendlyLoginName = response.FriendlyIdentifierForDisplay
+ ' Use FormsAuthentication to tell ASP.NET that the user is now logged in,
+ ' with the OpenID Claimed Identifier as their username.
+ FormsAuthentication.RedirectFromLoginPage(response.ClaimedIdentifier, False)
+ Case AuthenticationStatus.Canceled
+ Me.loginCanceledLabel.Visible = True
+ Case AuthenticationStatus.Failed
+ Me.loginFailedLabel.Visible = True
+ End Select
+ End If
+ End Sub
+End Class \ No newline at end of file
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/MembersOnly/Default.aspx b/src/OpenID/OpenIdRelyingPartyWebFormsVB/MembersOnly/Default.aspx
new file mode 100644
index 0000000..441ef84
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/MembersOnly/Default.aspx
@@ -0,0 +1,34 @@
+<%@ Page Language="VB" AutoEventWireup="true" MasterPageFile="~/Site.Master" %>
+<%@ Import Namespace="OpenIdRelyingPartyWebFormsVB" %>
+<%@ Register Src="~/MembersOnly/ProfileFieldsDisplay.ascx" TagPrefix="cc1" TagName="ProfileFieldsDisplay" %>
+<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="Main">
+ <h2>
+ Members Only Area
+ </h2>
+ <p>
+ Congratulations, <b><asp:LoginName ID="LoginName1" runat="server" /></b>.
+ You have completed the OpenID login process.
+ </p>
+
+<% If (State.PapePolicies IsNot Nothing) Then%>
+ <p>A PAPE extension was included in the authentication with this content: </p>
+ <ul>
+ <% If (State.PapePolicies.NistAssuranceLevel.HasValue) Then%>
+ <li>Nist: <%=HttpUtility.HtmlEncode(State.PapePolicies.NistAssuranceLevel.Value.ToString())%></li>
+ <% End If
+ For Each policy As String In State.PapePolicies.ActualPolicies%>
+ <li><%=HttpUtility.HtmlEncode(policy)%></li>
+ <% Next%>
+ </ul>
+<% End If %>
+
+<% If State.ProfileFields IsNot Nothing Then
+ profileFieldsDisplay.ProfileValues = State.ProfileFields%>
+ <p>
+ In addition to authenticating you, your OpenID Provider may
+ have told us something about you using the
+ Simple Registration extension:
+ </p>
+ <cc1:ProfileFieldsDisplay runat="server" ID="profileFieldsDisplay" />
+<% End If%>
+</asp:Content>
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/MembersOnly/ProfileFieldsDisplay.ascx b/src/OpenID/OpenIdRelyingPartyWebFormsVB/MembersOnly/ProfileFieldsDisplay.ascx
new file mode 100644
index 0000000..f6864e9
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/MembersOnly/ProfileFieldsDisplay.ascx
@@ -0,0 +1,91 @@
+<%@ Control Language="VB" AutoEventWireup="true" %>
+<%@ Import Namespace="DotNetOpenAuth.OpenId.Extensions.SimpleRegistration" %>
+
+<script runat="server">
+
+ Private _profileValues As ClaimsResponse
+ Public Property ProfileValues() As ClaimsResponse
+ Get
+ Return _profileValues
+ End Get
+ Set(ByVal value As ClaimsResponse)
+ _profileValues = value
+ End Set
+ End Property
+
+</script>
+
+<table id="profileFieldsTable" runat="server">
+ <tr>
+ <td>
+ Nickname
+ </td>
+ <td>
+ <%=ProfileValues.Nickname %>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Email
+ </td>
+ <td>
+ <%=ProfileValues.Email%>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ FullName
+ </td>
+ <td>
+ <%=ProfileValues.FullName%>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Date of Birth
+ </td>
+ <td>
+ <%=ProfileValues.BirthDate.ToString()%>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Gender
+ </td>
+ <td>
+ <%=ProfileValues.Gender.ToString()%>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Post Code
+ </td>
+ <td>
+ <%=ProfileValues.PostalCode%>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Country
+ </td>
+ <td>
+ <%=ProfileValues.Country%>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Language
+ </td>
+ <td>
+ <%=ProfileValues.Language%>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Timezone
+ </td>
+ <td>
+ <%=ProfileValues.TimeZone%>
+ </td>
+ </tr>
+</table>
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/MembersOnly/Web.config b/src/OpenID/OpenIdRelyingPartyWebFormsVB/MembersOnly/Web.config
new file mode 100644
index 0000000..3cfad05
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/MembersOnly/Web.config
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<!--
+ Note: As an alternative to hand editing this file you can use the
+ web admin tool to configure settings for your application. Use
+ the Website->Asp.Net Configuration option in Visual Studio.
+ A full list of settings and comments can be found in
+ machine.config.comments usually located in
+ \Windows\Microsoft.Net\Framework\v2.x\Config
+-->
+<configuration>
+ <appSettings/>
+ <connectionStrings/>
+ <system.web>
+ <authorization>
+ <deny users="?"/>
+ </authorization>
+ </system.web>
+</configuration>
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/Application.Designer.vb b/src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/Application.Designer.vb
new file mode 100644
index 0000000..bfbe6d3
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/Application.Designer.vb
@@ -0,0 +1,13 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+' This code was generated by a tool.
+' Runtime Version:4.0.30319.17379
+'
+' Changes to this file may cause incorrect behavior and will be lost if
+' the code is regenerated.
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/Application.myapp b/src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/Application.myapp
new file mode 100644
index 0000000..758895d
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/Application.myapp
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <MySubMain>false</MySubMain>
+ <SingleInstance>false</SingleInstance>
+ <ShutdownMode>0</ShutdownMode>
+ <EnableVisualStyles>true</EnableVisualStyles>
+ <AuthenticationMode>0</AuthenticationMode>
+ <ApplicationType>1</ApplicationType>
+ <SaveMySettingsOnExit>true</SaveMySettingsOnExit>
+</MyApplicationData>
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/AssemblyInfo.vb b/src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/AssemblyInfo.vb
new file mode 100644
index 0000000..813551f
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/AssemblyInfo.vb
@@ -0,0 +1,34 @@
+Imports System
+Imports System.Reflection
+Imports System.Runtime.InteropServices
+
+' General Information about an assembly is controlled through the following
+' set of attributes. Change these attribute values to modify the information
+' associated with an assembly.
+
+' Review the values of the assembly attributes
+<Assembly: AssemblyTitle("OpenIdRelyingPartyWebFormsVB")>
+<Assembly: AssemblyDescription("")>
+<Assembly: AssemblyCompany("")>
+<Assembly: AssemblyProduct("OpenIdRelyingPartyWebFormsVB")>
+<Assembly: AssemblyCopyright("Copyright © 2010")>
+<Assembly: AssemblyTrademark("")>
+
+<Assembly: ComVisible(False)>
+
+'The following GUID is for the ID of the typelib if this project is exposed to COM
+<Assembly: Guid("334e9cee-0d47-4d70-924b-b5098a3432cb")>
+
+' Version information for an assembly consists of the following four values:
+'
+' Major Version
+' Minor Version
+' Build Number
+' Revision
+'
+' You can specify all the values or you can default the Build and Revision Numbers
+' by using the '*' as shown below:
+' <Assembly: AssemblyVersion("1.0.*")>
+
+<Assembly: AssemblyVersion("1.0.0.0")>
+<Assembly: AssemblyFileVersion("1.0.0.0")>
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/MyExtensions/MyWebExtension.vb b/src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/MyExtensions/MyWebExtension.vb
new file mode 100644
index 0000000..78c7c19
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/MyExtensions/MyWebExtension.vb
@@ -0,0 +1,73 @@
+#If _MyType <> "Empty" Then
+
+Namespace My
+ ''' <summary>
+ ''' Module used to define the properties that are available in the My Namespace for Web projects.
+ ''' </summary>
+ ''' <remarks></remarks>
+ <Global.Microsoft.VisualBasic.HideModuleName()> _
+ Module MyWebExtension
+ Private s_Computer As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Devices.ServerComputer)
+ Private s_User As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.ApplicationServices.WebUser)
+ Private s_Log As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Logging.AspLog)
+ ''' <summary>
+ ''' Returns information about the host computer.
+ ''' </summary>
+ <Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
+ Friend ReadOnly Property Computer() As Global.Microsoft.VisualBasic.Devices.ServerComputer
+ Get
+ Return s_Computer.GetInstance()
+ End Get
+ End Property
+ ''' <summary>
+ ''' Returns information for the current Web user.
+ ''' </summary>
+ <Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
+ Friend ReadOnly Property User() As Global.Microsoft.VisualBasic.ApplicationServices.WebUser
+ Get
+ Return s_User.GetInstance()
+ End Get
+ End Property
+ ''' <summary>
+ ''' Returns Request object.
+ ''' </summary>
+ <Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
+ <Global.System.ComponentModel.Design.HelpKeyword("My.Request")> _
+ Friend ReadOnly Property Request() As Global.System.Web.HttpRequest
+ <Global.System.Diagnostics.DebuggerHidden()> _
+ Get
+ Dim CurrentContext As Global.System.Web.HttpContext = Global.System.Web.HttpContext.Current
+ If CurrentContext IsNot Nothing Then
+ Return CurrentContext.Request
+ End If
+ Return Nothing
+ End Get
+ End Property
+ ''' <summary>
+ ''' Returns Response object.
+ ''' </summary>
+ <Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
+ <Global.System.ComponentModel.Design.HelpKeyword("My.Response")> _
+ Friend ReadOnly Property Response() As Global.System.Web.HttpResponse
+ <Global.System.Diagnostics.DebuggerHidden()> _
+ Get
+ Dim CurrentContext As Global.System.Web.HttpContext = Global.System.Web.HttpContext.Current
+ If CurrentContext IsNot Nothing Then
+ Return CurrentContext.Response
+ End If
+ Return Nothing
+ End Get
+ End Property
+ ''' <summary>
+ ''' Returns the Asp log object.
+ ''' </summary>
+ <Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
+ Friend ReadOnly Property Log() As Global.Microsoft.VisualBasic.Logging.AspLog
+ Get
+ Return s_Log.GetInstance()
+ End Get
+ End Property
+ End Module
+End Namespace
+
+#End If \ No newline at end of file
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/Resources.Designer.vb b/src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/Resources.Designer.vb
new file mode 100644
index 0000000..6adbe22
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/Resources.Designer.vb
@@ -0,0 +1,63 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+' This code was generated by a tool.
+' Runtime Version:4.0.30319.17379
+'
+' Changes to this file may cause incorrect behavior and will be lost if
+' the code is regenerated.
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+Imports System
+
+Namespace My.Resources
+
+ 'This class was auto-generated by the StronglyTypedResourceBuilder
+ 'class via a tool like ResGen or Visual Studio.
+ 'To add or remove a member, edit your .ResX file then rerun ResGen
+ 'with the /str option, or rebuild your VS project.
+ '''<summary>
+ ''' A strongly-typed resource class, for looking up localized strings, etc.
+ '''</summary>
+ <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
+ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
+ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
+ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
+ Friend Module Resources
+
+ Private resourceMan As Global.System.Resources.ResourceManager
+
+ Private resourceCulture As Global.System.Globalization.CultureInfo
+
+ '''<summary>
+ ''' Returns the cached ResourceManager instance used by this class.
+ '''</summary>
+ <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
+ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
+ Get
+ If Object.ReferenceEquals(resourceMan, Nothing) Then
+ Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("OpenIdRelyingPartyWebFormsVB.Resources", GetType(Resources).Assembly)
+ resourceMan = temp
+ End If
+ Return resourceMan
+ End Get
+ End Property
+
+ '''<summary>
+ ''' Overrides the current thread's CurrentUICulture property for all
+ ''' resource lookups using this strongly typed resource class.
+ '''</summary>
+ <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
+ Friend Property Culture() As Global.System.Globalization.CultureInfo
+ Get
+ Return resourceCulture
+ End Get
+ Set
+ resourceCulture = value
+ End Set
+ End Property
+ End Module
+End Namespace
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/Resources.resx b/src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/Resources.resx
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root> \ No newline at end of file
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/Settings.Designer.vb b/src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/Settings.Designer.vb
new file mode 100644
index 0000000..1e0279c
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/Settings.Designer.vb
@@ -0,0 +1,73 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+' This code was generated by a tool.
+' Runtime Version:4.0.30319.17379
+'
+' Changes to this file may cause incorrect behavior and will be lost if
+' the code is regenerated.
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+
+Namespace My
+
+ <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
+ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0"), _
+ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
+ Partial Friend NotInheritable Class MySettings
+ Inherits Global.System.Configuration.ApplicationSettingsBase
+
+ Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
+
+#Region "My.Settings Auto-Save Functionality"
+#If _MyType = "WindowsForms" Then
+ Private Shared addedHandler As Boolean
+
+ Private Shared addedHandlerLockObject As New Object
+
+ <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
+ Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
+ If My.Application.SaveMySettingsOnExit Then
+ My.Settings.Save()
+ End If
+ End Sub
+#End If
+#End Region
+
+ Public Shared ReadOnly Property [Default]() As MySettings
+ Get
+
+#If _MyType = "WindowsForms" Then
+ If Not addedHandler Then
+ SyncLock addedHandlerLockObject
+ If Not addedHandler Then
+ AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
+ addedHandler = True
+ End If
+ End SyncLock
+ End If
+#End If
+ Return defaultInstance
+ End Get
+ End Property
+ End Class
+End Namespace
+
+Namespace My
+
+ <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
+ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
+ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
+ Friend Module MySettingsProperty
+
+ <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
+ Friend ReadOnly Property Settings() As Global.OpenIdRelyingPartyWebFormsVB.My.MySettings
+ Get
+ Return Global.OpenIdRelyingPartyWebFormsVB.My.MySettings.Default
+ End Get
+ End Property
+ End Module
+End Namespace
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/Settings.settings b/src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/Settings.settings
new file mode 100644
index 0000000..85b890b
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/My Project/Settings.settings
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
+ <Profiles>
+ <Profile Name="(Default)" />
+ </Profiles>
+ <Settings />
+</SettingsFile>
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/OpenIdRelyingPartyWebFormsVB.vbproj b/src/OpenID/OpenIdRelyingPartyWebFormsVB/OpenIdRelyingPartyWebFormsVB.vbproj
new file mode 100644
index 0000000..de7d05c
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/OpenIdRelyingPartyWebFormsVB.vbproj
@@ -0,0 +1,245 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.props))\EnlistmentInfo.props" Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.props))' != '' " />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{F289B925-4307-4BEC-B411-885CE70E3379}</ProjectGuid>
+ <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <RootNamespace>OpenIdRelyingPartyWebFormsVB</RootNamespace>
+ <AssemblyName>OpenIdRelyingPartyWebFormsVB</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <MyType>Custom</MyType>
+ <OptionExplicit>On</OptionExplicit>
+ <OptionCompare>Binary</OptionCompare>
+ <OptionStrict>Off</OptionStrict>
+ <OptionInfer>On</OptionInfer>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation />
+ <UseIISExpress>false</UseIISExpress>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\</SolutionDir>
+ <RestorePackages>true</RestorePackages>
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <DefineDebug>true</DefineDebug>
+ <DefineTrace>true</DefineTrace>
+ <OutputPath>bin\</OutputPath>
+ <DocumentationFile>OpenIdRelyingPartyWebFormsVB.xml</DocumentationFile>
+ <NoWarn>41999,42016,42020,42021,42022,42353,42354,42355</NoWarn>
+ <WarningsAsErrors>42017,42018,42019,42032,42036</WarningsAsErrors>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <DefineDebug>false</DefineDebug>
+ <DefineTrace>true</DefineTrace>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\</OutputPath>
+ <DocumentationFile>OpenIdRelyingPartyWebFormsVB.xml</DocumentationFile>
+ <NoWarn>41999,42016,42020,42021,42022,42353,42354,42355</NoWarn>
+ <WarningsAsErrors>42017,42018,42019,42032,42036</WarningsAsErrors>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="DotNetOpenAuth.Core">
+ <HintPath>..\..\..\packages\DotNetOpenAuth.Core.4.0.0-RC1\lib\net40-full\DotNetOpenAuth.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="DotNetOpenAuth.Core.UI">
+ <HintPath>..\..\..\packages\DotNetOpenAuth.Core.UI.4.0.0-RC1\lib\net40-full\DotNetOpenAuth.Core.UI.dll</HintPath>
+ </Reference>
+ <Reference Include="DotNetOpenAuth.OpenId">
+ <HintPath>..\..\..\packages\DotNetOpenAuth.OpenId.Core.4.0.0-RC1\lib\net40-full\DotNetOpenAuth.OpenId.dll</HintPath>
+ </Reference>
+ <Reference Include="DotNetOpenAuth.OpenId.RelyingParty">
+ <HintPath>..\..\..\packages\DotNetOpenAuth.OpenId.RelyingParty.4.0.0-RC1\lib\net40-full\DotNetOpenAuth.OpenId.RelyingParty.dll</HintPath>
+ </Reference>
+ <Reference Include="DotNetOpenAuth.OpenId.RelyingParty.UI">
+ <HintPath>..\..\..\packages\DotNetOpenAuth.OpenId.RelyingParty.UI.4.0.0-RC1\lib\net40-full\DotNetOpenAuth.OpenId.RelyingParty.UI.dll</HintPath>
+ </Reference>
+ <Reference Include="DotNetOpenAuth.OpenId.UI">
+ <HintPath>..\..\..\packages\DotNetOpenAuth.OpenId.Core.UI.4.0.0-RC1\lib\net40-full\DotNetOpenAuth.OpenId.UI.dll</HintPath>
+ </Reference>
+ <Reference Include="log4net">
+ <HintPath>..\..\..\packages\log4net.2.0.0\lib\net40-full\log4net.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Web.ApplicationServices" />
+ <Reference Include="System.Web.DynamicData" />
+ <Reference Include="System.Web.Entity" />
+ <Reference Include="System.Web.Extensions" />
+ <Reference Include="System.Web" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Configuration" />
+ <Reference Include="System.Web.Services" />
+ <Reference Include="System.EnterpriseServices" />
+ <Reference Include="System.Web.Mobile" />
+ <Reference Include="System.Xml.Linq" />
+ </ItemGroup>
+ <ItemGroup>
+ <Import Include="Microsoft.VisualBasic" />
+ <Import Include="System" />
+ <Import Include="System.Collections" />
+ <Import Include="System.Collections.Generic" />
+ <Import Include="System.Data" />
+ <Import Include="System.Linq" />
+ <Import Include="System.Xml.Linq" />
+ <Import Include="System.Diagnostics" />
+ <Import Include="System.Collections.Specialized" />
+ <Import Include="System.Configuration" />
+ <Import Include="System.Text" />
+ <Import Include="System.Text.RegularExpressions" />
+ <Import Include="System.Web" />
+ <Import Include="System.Web.Caching" />
+ <Import Include="System.Web.SessionState" />
+ <Import Include="System.Web.Security" />
+ <Import Include="System.Web.Profile" />
+ <Import Include="System.Web.UI" />
+ <Import Include="System.Web.UI.WebControls" />
+ <Import Include="System.Web.UI.WebControls.WebParts" />
+ <Import Include="System.Web.UI.HtmlControls" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="Default.aspx" />
+ <Content Include="images\openid_login.png" />
+ <Content Include="Login.aspx" />
+ <Content Include="Web.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Code\State.vb" />
+ <Compile Include="Code\TracePageAppender.vb" />
+ <Compile Include="Default.aspx.vb">
+ <SubType>ASPXCodeBehind</SubType>
+ <DependentUpon>Default.aspx</DependentUpon>
+ </Compile>
+ <Compile Include="Default.aspx.designer.vb">
+ <DependentUpon>Default.aspx</DependentUpon>
+ </Compile>
+ <Compile Include="Global.asax.vb">
+ <DependentUpon>Global.asax</DependentUpon>
+ </Compile>
+ <Compile Include="Login.aspx.designer.vb">
+ <DependentUpon>Login.aspx</DependentUpon>
+ </Compile>
+ <Compile Include="Login.aspx.vb">
+ <DependentUpon>Login.aspx</DependentUpon>
+ <SubType>ASPXCodebehind</SubType>
+ </Compile>
+ <Compile Include="LoginProgrammatic.aspx.designer.vb">
+ <DependentUpon>LoginProgrammatic.aspx</DependentUpon>
+ </Compile>
+ <Compile Include="LoginProgrammatic.aspx.vb">
+ <DependentUpon>LoginProgrammatic.aspx</DependentUpon>
+ <SubType>ASPXCodebehind</SubType>
+ </Compile>
+ <Compile Include="My Project\AssemblyInfo.vb" />
+ <Compile Include="My Project\Application.Designer.vb">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Application.myapp</DependentUpon>
+ </Compile>
+ <Compile Include="My Project\MyExtensions\MyWebExtension.vb">
+ <VBMyExtensionTemplateID>Microsoft.VisualBasic.Web.MyExtension</VBMyExtensionTemplateID>
+ <VBMyExtensionTemplateVersion>1.0.0.0</VBMyExtensionTemplateVersion>
+ </Compile>
+ <Compile Include="My Project\Resources.Designer.vb">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ <Compile Include="My Project\Settings.Designer.vb">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Settings.settings</DependentUpon>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ </Compile>
+ <Compile Include="TracePage.aspx.designer.vb">
+ <DependentUpon>TracePage.aspx</DependentUpon>
+ </Compile>
+ <Compile Include="TracePage.aspx.vb">
+ <DependentUpon>TracePage.aspx</DependentUpon>
+ <SubType>ASPXCodebehind</SubType>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="My Project\Resources.resx">
+ <Generator>VbMyResourcesResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.vb</LastGenOutput>
+ <CustomToolNamespace>My.Resources</CustomToolNamespace>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="Global.asax" />
+ <Content Include="LoginProgrammatic.aspx" />
+ <Content Include="MembersOnly\ProfileFieldsDisplay.ascx" />
+ <Content Include="MembersOnly\Web.config" />
+ <None Include="My Project\Application.myapp">
+ <Generator>MyApplicationCodeGenerator</Generator>
+ <LastGenOutput>Application.Designer.vb</LastGenOutput>
+ </None>
+ <None Include="My Project\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <CustomToolNamespace>My</CustomToolNamespace>
+ <LastGenOutput>Settings.Designer.vb</LastGenOutput>
+ </None>
+ <Content Include="favicon.ico" />
+ <Content Include="images\attention.png" />
+ <Content Include="images\DotNetOpenAuth.png" />
+ <Content Include="images\yahoo.png" />
+ <Content Include="MembersOnly\Default.aspx" />
+ <Content Include="PrivacyPolicy.aspx" />
+ <Content Include="Site.Master" />
+ <Content Include="styles.css" />
+ <Content Include="TracePage.aspx" />
+ <Content Include="xrds.aspx" />
+ <Content Include="packages.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\DotNetOpenAuth.ApplicationBlock\DotNetOpenAuth.ApplicationBlock.csproj">
+ <Project>{AA78D112-D889-414B-A7D4-467B34C7B663}</Project>
+ <Name>DotNetOpenAuth.ApplicationBlock</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="App_Data\" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
+ <WebProjectProperties>
+ <UseIIS>False</UseIIS>
+ <AutoAssignPort>True</AutoAssignPort>
+ <DevelopmentServerPort>27433</DevelopmentServerPort>
+ <DevelopmentServerVPath>/</DevelopmentServerVPath>
+ <IISUrl>
+ </IISUrl>
+ <NTLMAuthentication>False</NTLMAuthentication>
+ <UseCustomServer>False</UseCustomServer>
+ <CustomServerUrl>
+ </CustomServerUrl>
+ <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
+ </WebProjectProperties>
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))\EnlistmentInfo.targets" Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))' != '' " />
+ <Import Project="$(SolutionDir)\.nuget\nuget.targets" />
+</Project> \ No newline at end of file
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/PrivacyPolicy.aspx b/src/OpenID/OpenIdRelyingPartyWebFormsVB/PrivacyPolicy.aspx
new file mode 100644
index 0000000..7b72cd4
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/PrivacyPolicy.aspx
@@ -0,0 +1,7 @@
+<%@ Page Language="VB" AutoEventWireup="true" MasterPageFile="~/Site.Master" %>
+<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="Main">
+ <h2>Privacy Policy</h2>
+ <p>
+ Some privacy policy would go here.
+ </p>
+</asp:Content> \ No newline at end of file
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/Site.Master b/src/OpenID/OpenIdRelyingPartyWebFormsVB/Site.Master
new file mode 100644
index 0000000..7a92712
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/Site.Master
@@ -0,0 +1,39 @@
+<%@ Master Language="VB" AutoEventWireup="true" %>
+<%@ Import Namespace="OpenIdRelyingPartyWebFormsVB" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<script runat="server">
+ Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
+ friendlyUsername.Text = State.FriendlyLoginName
+ End Sub
+
+ Protected Sub LoginStatus1_LoggedOut(ByVal sender As Object, ByVal e As EventArgs)
+ State.Clear()
+ End Sub
+</script>
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head runat="server">
+ <title>OpenID Relying Party, by DotNetOpenAuth</title>
+ <link href="styles.css" rel="stylesheet" type="text/css" />
+ <asp:ContentPlaceHolder ID="head" runat="server" />
+</head>
+<body>
+ <form id="form1" runat="server">
+ <span style="float: right">
+ <asp:Image runat="server" ID="openIdUsernameImage" ImageUrl="~/images/openid_login.png"
+ EnableViewState="false" />
+ <asp:Label runat="server" ID="friendlyUsername" Text="" EnableViewState="false" />
+ <asp:LoginStatus ID="LoginStatus1" runat="server" OnLoggedOut="LoginStatus1_LoggedOut" />
+ </span>
+ <div>
+ <a href="http://dotnetopenauth.net">
+ <img runat="server" src="~/images/DotNetOpenAuth.png" title="Jump to the project web site."
+ alt="DotNetOpenAuth" border='0' /></a>
+ </div>
+ <div>
+ <asp:ContentPlaceHolder ID="Main" runat="server" />
+ </div>
+ </form>
+</body>
+</html>
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/TracePage.aspx b/src/OpenID/OpenIdRelyingPartyWebFormsVB/TracePage.aspx
new file mode 100644
index 0000000..8df914b
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/TracePage.aspx
@@ -0,0 +1,16 @@
+<%@ Page Language="VB" AutoEventWireup="true" CodeBehind="TracePage.aspx.vb" Inherits="OpenIdRelyingPartyWebFormsVB.TracePage" %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head id="Head1" runat="server">
+ <title></title>
+</head>
+<body>
+ <form id="form1" runat="server">
+ <p align="right">
+ <asp:Button runat="server" Text="Clear log" ID="clearLogButton" OnClick="clearLogButton_Click" />
+ </p>
+ <pre><asp:PlaceHolder runat="server" ID="placeHolder1" /></pre>
+ </form>
+</body>
+</html>
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/TracePage.aspx.designer.vb b/src/OpenID/OpenIdRelyingPartyWebFormsVB/TracePage.aspx.designer.vb
new file mode 100644
index 0000000..9928c68
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/TracePage.aspx.designer.vb
@@ -0,0 +1,53 @@
+'------------------------------------------------------------------------------
+' <auto-generated>
+' This code was generated by a tool.
+' Runtime Version:2.0.50727.4927
+'
+' Changes to this file may cause incorrect behavior and will be lost if
+' the code is regenerated.
+' </auto-generated>
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+
+
+Partial Public Class TracePage
+
+ '''<summary>
+ '''Head1 control.
+ '''</summary>
+ '''<remarks>
+ '''Auto-generated field.
+ '''To modify move field declaration from designer file to code-behind file.
+ '''</remarks>
+ Protected WithEvents Head1 As Global.System.Web.UI.HtmlControls.HtmlHead
+
+ '''<summary>
+ '''form1 control.
+ '''</summary>
+ '''<remarks>
+ '''Auto-generated field.
+ '''To modify move field declaration from designer file to code-behind file.
+ '''</remarks>
+ Protected WithEvents form1 As Global.System.Web.UI.HtmlControls.HtmlForm
+
+ '''<summary>
+ '''clearLogButton control.
+ '''</summary>
+ '''<remarks>
+ '''Auto-generated field.
+ '''To modify move field declaration from designer file to code-behind file.
+ '''</remarks>
+ Protected WithEvents clearLogButton As Global.System.Web.UI.WebControls.Button
+
+ '''<summary>
+ '''placeHolder1 control.
+ '''</summary>
+ '''<remarks>
+ '''Auto-generated field.
+ '''To modify move field declaration from designer file to code-behind file.
+ '''</remarks>
+ Protected WithEvents placeHolder1 As Global.System.Web.UI.WebControls.PlaceHolder
+End Class
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/TracePage.aspx.vb b/src/OpenID/OpenIdRelyingPartyWebFormsVB/TracePage.aspx.vb
new file mode 100644
index 0000000..9a1b8c1
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/TracePage.aspx.vb
@@ -0,0 +1,13 @@
+Public Class TracePage
+ Inherits System.Web.UI.Page
+
+ Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
+ Me.placeHolder1.Controls.Add(New Label() With {.Text = HttpUtility.HtmlEncode(Global_asax.LogMessages.ToString())})
+ End Sub
+
+ Protected Sub clearLogButton_Click(ByVal sender As Object, ByVal e As EventArgs)
+ Global_asax.LogMessages.Length = 0
+ ' clear the page immediately, and allow for F5 without a Postback warning.
+ Me.Response.Redirect(Me.Request.Url.AbsoluteUri)
+ End Sub
+End Class \ No newline at end of file
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/Web.config b/src/OpenID/OpenIdRelyingPartyWebFormsVB/Web.config
new file mode 100644
index 0000000..98bc562
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/Web.config
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <configSections>
+ <section name="uri" type="System.Configuration.UriSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler" requirePermission="false" />
+ <sectionGroup name="dotNetOpenAuth" type="DotNetOpenAuth.Configuration.DotNetOpenAuthSection, DotNetOpenAuth.Core">
+ <section name="openid" type="DotNetOpenAuth.Configuration.OpenIdElement, DotNetOpenAuth.OpenId" requirePermission="false" allowLocation="true" />
+ <section name="oauth" type="DotNetOpenAuth.Configuration.OAuthElement, DotNetOpenAuth.OAuth" requirePermission="false" allowLocation="true" />
+ <section name="messaging" type="DotNetOpenAuth.Configuration.MessagingElement, DotNetOpenAuth.Core" requirePermission="false" allowLocation="true" />
+ <section name="reporting" type="DotNetOpenAuth.Configuration.ReportingElement, DotNetOpenAuth.Core" requirePermission="false" allowLocation="true" />
+ </sectionGroup>
+ </configSections>
+ <!-- The uri section is necessary to turn on .NET 3.5 support for IDN (international domain names),
+ which is necessary for OpenID urls with unicode characters in the domain/host name.
+ It is also required to put the Uri class into RFC 3986 escaping mode, which OpenID and OAuth require. -->
+ <uri>
+ <idn enabled="All" />
+ <iriParsing enabled="true" />
+ </uri>
+ <system.net>
+ <defaultProxy enabled="true" />
+ <settings>
+ <!-- This setting causes .NET to check certificate revocation lists (CRL)
+ before trusting HTTPS certificates. But this setting tends to not
+ be allowed in shared hosting environments. -->
+ <!--<servicePointManager checkCertificateRevocationList="true"/>-->
+ </settings>
+ </system.net>
+ <!-- this is an optional configuration section where aspects of dotnetopenauth can be customized -->
+ <dotNetOpenAuth>
+ <openid>
+ <relyingParty>
+ <security requireSsl="false">
+ <!-- Uncomment the trustedProviders tag if your relying party should only accept positive assertions from a closed set of OpenID Providers. -->
+ <!--<trustedProviders rejectAssertionsFromUntrustedProviders="true">
+ <add endpoint="https://www.google.com/accounts/o8/ud" />
+ </trustedProviders>-->
+ </security>
+ <behaviors>
+ <!-- The following OPTIONAL behavior allows RPs to use SREG only, but be compatible
+ with OPs that use Attribute Exchange (in various formats). -->
+ <add type="DotNetOpenAuth.OpenId.RelyingParty.Behaviors.AXFetchAsSregTransform, DotNetOpenAuth.OpenId.RelyingParty" />
+ <!--<add type="DotNetOpenAuth.OpenId.RelyingParty.Behaviors.GsaIcamProfile, DotNetOpenAuth.OpenId.RelyingParty" />-->
+ </behaviors>
+ <!-- Uncomment the following to activate the sample custom store. -->
+ <!--<store type="OpenIdRelyingPartyWebFormsVB.CustomStore, OpenIdRelyingPartyWebFormsVB" />-->
+ </relyingParty>
+ </openid>
+ <messaging>
+ <untrustedWebRequest>
+ <whitelistHosts>
+ <!-- since this is a sample, and will often be used with localhost -->
+ <add name="localhost" />
+ </whitelistHosts>
+ </untrustedWebRequest>
+ </messaging>
+ <!-- Allow DotNetOpenAuth to publish usage statistics to library authors to improve the library. -->
+ <reporting enabled="true" />
+ </dotNetOpenAuth>
+ <appSettings>
+ <!-- Fill in your various consumer keys and secrets here to make the sample work. -->
+ <!-- You must get these values by signing up with each individual service provider. -->
+ <!-- Google sign-up: https://www.google.com/accounts/ManageDomains -->
+ <add key="googleConsumerKey" value="demo.dotnetopenauth.net" />
+ <add key="googleConsumerSecret" value="5Yv1TfKm1551QrXZ9GpqepeD" />
+ </appSettings>
+ <system.web>
+ <!--<sessionState cookieless="true" />-->
+ <compilation debug="true" targetFramework="4.0">
+ <assemblies>
+ <remove assembly="DotNetOpenAuth.Contracts" />
+ </assemblies>
+ </compilation>
+ <customErrors mode="RemoteOnly" />
+ <authentication mode="Forms">
+ <forms name="OpenIdRelyingPartyVBSession" />
+ <!-- named cookie prevents conflicts with other samples -->
+ </authentication>
+ <trace enabled="false" writeToDiagnosticsTrace="true" />
+ <!-- Trust level discussion:
+ Full: everything works (this is required for Google Apps for Domains support)
+ High: TRACE compilation symbol must NOT be defined
+ Medium: doesn't work unless originUrl=".*" or WebPermission.Connect is extended, and Google Apps doesn't work.
+ Low: doesn't work because WebPermission.Connect is denied.
+ -->
+ <trust level="Medium" originUrl=".*" />
+ <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" />
+ </system.web>
+ <!-- log4net is a 3rd party (free) logger library that DotNetOpenAuth will use if present but does not require. -->
+ <log4net>
+ <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
+ <file value="RelyingParty.log" />
+ <appendToFile value="true" />
+ <rollingStyle value="Size" />
+ <maxSizeRollBackups value="10" />
+ <maximumFileSize value="100KB" />
+ <staticLogFileName value="true" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date (GMT%date{%z}) [%thread] %-5level %logger - %message%newline" />
+ </layout>
+ </appender>
+ <appender name="TracePageAppender" type="OpenIdRelyingPartyWebFormsVB.TracePageAppender, OpenIdRelyingPartyWebFormsVB">
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date (GMT%date{%z}) [%thread] %-5level %logger - %message%newline" />
+ </layout>
+ </appender>
+ <!-- Setup the root category, add the appenders and set the default level -->
+ <root>
+ <level value="INFO" />
+ <!--<appender-ref ref="RollingFileAppender" />-->
+ <appender-ref ref="TracePageAppender" />
+ </root>
+ <!-- Specify the level for some specific categories -->
+ <logger name="DotNetOpenAuth">
+ <level value="INFO" />
+ </logger>
+ </log4net>
+ <runtime>
+ <legacyHMACWarning enabled="0" />
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
+ <bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration> \ No newline at end of file
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/favicon.ico b/src/OpenID/OpenIdRelyingPartyWebFormsVB/favicon.ico
new file mode 100644
index 0000000..e227dbe
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/favicon.ico
Binary files differ
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/images/DotNetOpenAuth.png b/src/OpenID/OpenIdRelyingPartyWebFormsVB/images/DotNetOpenAuth.png
new file mode 100644
index 0000000..442b986
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/images/DotNetOpenAuth.png
Binary files differ
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/images/attention.png b/src/OpenID/OpenIdRelyingPartyWebFormsVB/images/attention.png
new file mode 100644
index 0000000..8003700
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/images/attention.png
Binary files differ
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/images/openid_login.png b/src/OpenID/OpenIdRelyingPartyWebFormsVB/images/openid_login.png
new file mode 100644
index 0000000..caebd58
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/images/openid_login.png
Binary files differ
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/images/yahoo.png b/src/OpenID/OpenIdRelyingPartyWebFormsVB/images/yahoo.png
new file mode 100644
index 0000000..3129217
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/images/yahoo.png
Binary files differ
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/packages.config b/src/OpenID/OpenIdRelyingPartyWebFormsVB/packages.config
new file mode 100644
index 0000000..e4866e8
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/packages.config
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="CodeContracts.Unofficial" version="1.0.0.2" />
+ <package id="DotNetOpenAuth.Core" version="4.0.0-RC1" />
+ <package id="DotNetOpenAuth.Core.UI" version="4.0.0-RC1" />
+ <package id="DotNetOpenAuth.OpenId.Core" version="4.0.0-RC1" />
+ <package id="DotNetOpenAuth.OpenId.Core.UI" version="4.0.0-RC1" />
+ <package id="DotNetOpenAuth.OpenId.RelyingParty" version="4.0.0-RC1" />
+ <package id="DotNetOpenAuth.OpenId.RelyingParty.UI" version="4.0.0-RC1" />
+ <package id="log4net" version="2.0.0" />
+</packages> \ No newline at end of file
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/styles.css b/src/OpenID/OpenIdRelyingPartyWebFormsVB/styles.css
new file mode 100644
index 0000000..2e4d3db
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/styles.css
@@ -0,0 +1,10 @@
+h2
+{
+ font-style: italic;
+}
+
+body
+{
+ font-family: Cambria, Arial, Times New Roman;
+ font-size: 12pt;
+} \ No newline at end of file
diff --git a/src/OpenID/OpenIdRelyingPartyWebFormsVB/xrds.aspx b/src/OpenID/OpenIdRelyingPartyWebFormsVB/xrds.aspx
new file mode 100644
index 0000000..130ca30
--- /dev/null
+++ b/src/OpenID/OpenIdRelyingPartyWebFormsVB/xrds.aspx
@@ -0,0 +1,29 @@
+<%@ Page Language="VB" AutoEventWireup="true" ContentType="application/xrds+xml" %><?xml version="1.0" encoding="UTF-8"?>
+<%--
+This page is a required for relying party discovery per OpenID 2.0.
+It allows Providers to call back to the relying party site to confirm the
+identity that it is claiming in the realm and return_to URLs.
+This page should be pointed to by the 'realm' home page, which in this sample
+is default.aspx.
+--%>
+<xrds:XRDS
+ xmlns:xrds="xri://$xrds"
+ xmlns:openid="http://openid.net/xmlns/1.0"
+ xmlns="xri://$xrd*($v*2.0)">
+ <XRD>
+ <Service priority="1">
+ <Type>http://specs.openid.net/auth/2.0/return_to</Type>
+ <%-- Every page with an OpenID login should be listed here. --%>
+ <URI priority="1"><%=new Uri(Request.Url, Response.ApplyAppPathModifier("~/login.aspx"))%></URI>
+ <URI priority="2"><%=new Uri(Request.Url, Response.ApplyAppPathModifier("~/loginProgrammatic.aspx"))%></URI>
+ <URI priority="3"><%=new Uri(Request.Url, Response.ApplyAppPathModifier("~/ajaxlogin.aspx"))%></URI>
+ <URI priority="4"><%=new Uri(Request.Url, Response.ApplyAppPathModifier("~/NoIdentityOpenId.aspx"))%></URI>
+ <URI priority="5"><%=new Uri(Request.Url, Response.ApplyAppPathModifier("~/loginPlusOAuth.aspx"))%></URI>
+ <URI priority="6"><%=new Uri(Request.Url, Response.ApplyAppPathModifier("~/loginPlusOAuthSampleOP.aspx"))%></URI>
+ </Service>
+ <Service>
+ <Type>http://specs.openid.net/extensions/ui/icon</Type>
+ <URI><%=New Uri(Request.Url, Response.ApplyAppPathModifier("~/images/DotNetOpenAuth.png"))%></URI>
+ </Service>
+ </XRD>
+</xrds:XRDS>