summaryrefslogtreecommitdiffstats
path: root/samples/OpenIdProviderWebForms/Code
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-02-04 21:17:44 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2009-02-04 21:17:44 -0800
commit02f2c3d583b2bc134aec8c9ffb6b97d0e9af553b (patch)
tree0d9b9b51800845a0e6bc07439fb55b847b2ef166 /samples/OpenIdProviderWebForms/Code
parentefc59889061d44ba3fbd7701338e323aa053fbdf (diff)
downloadDotNetOpenAuth-02f2c3d583b2bc134aec8c9ffb6b97d0e9af553b.zip
DotNetOpenAuth-02f2c3d583b2bc134aec8c9ffb6b97d0e9af553b.tar.gz
DotNetOpenAuth-02f2c3d583b2bc134aec8c9ffb6b97d0e9af553b.tar.bz2
Fixed TODO areas of code.
Diffstat (limited to 'samples/OpenIdProviderWebForms/Code')
-rw-r--r--samples/OpenIdProviderWebForms/Code/CustomStore.cs54
-rw-r--r--samples/OpenIdProviderWebForms/Code/CustomStoreDataSet.Designer.cs369
-rw-r--r--samples/OpenIdProviderWebForms/Code/CustomStoreDataSet.xsd19
-rw-r--r--samples/OpenIdProviderWebForms/Code/CustomStoreDataSet.xss5
4 files changed, 440 insertions, 7 deletions
diff --git a/samples/OpenIdProviderWebForms/Code/CustomStore.cs b/samples/OpenIdProviderWebForms/Code/CustomStore.cs
index 8031a59..34a3bc4 100644
--- a/samples/OpenIdProviderWebForms/Code/CustomStore.cs
+++ b/samples/OpenIdProviderWebForms/Code/CustomStore.cs
@@ -11,6 +11,7 @@ namespace OpenIdProviderWebForms.Code {
using System.Security.Cryptography;
using DotNetOpenAuth.OpenId;
using IProviderAssociationStore = DotNetOpenAuth.OpenId.IAssociationStore<DotNetOpenAuth.OpenId.AssociationRelyingPartyType>;
+ using DotNetOpenAuth.OpenId.Provider;
/// <summary>
/// This custom store serializes all elements to demonstrate peristent and/or shared storage.
@@ -22,7 +23,7 @@ namespace OpenIdProviderWebForms.Code {
/// But we "persist" all associations and nonces into a DataTable to demonstrate
/// that using a database is possible.
/// </remarks>
- public class CustomStore : IProviderAssociationStore {
+ public class CustomStore : IProviderApplicationStore {
private static CustomStoreDataSet dataSet = new CustomStoreDataSet();
#region IAssociationStore<AssociationRelyingPartyType> Members
@@ -36,7 +37,8 @@ namespace OpenIdProviderWebForms.Code {
dataSet.Association.AddAssociationRow(assocRow);
}
- public Association GetAssociation(AssociationRelyingPartyType distinguishingFactor) {
+ public Association GetAssociation(AssociationRelyingPartyType distinguishingFactor, SecuritySettings securitySettings) {
+ // TODO: properly consider the securitySettings when picking an association to return.
// properly escape the URL to prevent injection attacks.
string value = distinguishingFactor.ToString();
string filter = string.Format(
@@ -85,5 +87,53 @@ namespace OpenIdProviderWebForms.Code {
view.Delete(i);
}
}
+
+ #region INonceStore Members
+
+ /// <summary>
+ /// Stores a given nonce and timestamp.
+ /// </summary>
+ /// <param name="nonce">A series of random characters.</param>
+ /// <param name="timestamp">The timestamp that together with the nonce string make it unique.
+ /// The timestamp may also be used by the data store to clear out old nonces.</param>
+ /// <returns>
+ /// True if the nonce+timestamp (combination) was not previously in the database.
+ /// False if the nonce was stored previously with the same timestamp.
+ /// </returns>
+ /// <remarks>
+ /// The nonce must be stored for no less than the maximum time window a message may
+ /// be processed within before being discarded as an expired message.
+ /// If the binding element is applicable to your channel, this expiration window
+ /// is retrieved or set using the
+ /// <see cref="StandardExpirationBindingElement.MaximumMessageAge"/> property.
+ /// </remarks>
+ public bool StoreNonce(string nonce, DateTime timestamp) {
+ // IMPORTANT: If actually persisting to a database that can be reached from
+ // different servers/instances of this class at once, it is vitally important
+ // to protect against race condition attacks by one or more of these:
+ // 1) setting a UNIQUE constraint on the nonce CODE in the SQL table
+ // 2) Using a transaction with repeatable reads to guarantee that a check
+ // that verified a nonce did not exist will prevent that nonce from being
+ // added by another process while this process is adding it.
+ // And then you'll want to catch the exception that the SQL database can throw
+ // at you in the result of a race condition somewhere in your web site UI code
+ // and display some message to have the user try to log in again, and possibly
+ // warn them about a replay attack.
+ lock (this) {
+ if (dataSet.Nonce.FindByCode(nonce) != null) {
+ return false;
+ }
+
+ TimeSpan maxMessageAge = DotNetOpenAuth.Configuration.DotNetOpenAuthSection.Configuration.Messaging.MaximumMessageLifetime;
+ dataSet.Nonce.AddNonceRow(nonce, timestamp.ToLocalTime(), (timestamp + maxMessageAge).ToLocalTime());
+ return true;
+ }
+ }
+
+ public void ClearExpiredNonces() {
+ this.removeExpiredRows(dataSet.Nonce, dataSet.Nonce.ExpiresColumn.ColumnName);
+ }
+
+ #endregion
}
}
diff --git a/samples/OpenIdProviderWebForms/Code/CustomStoreDataSet.Designer.cs b/samples/OpenIdProviderWebForms/Code/CustomStoreDataSet.Designer.cs
index 58c20a9..4870172 100644
--- a/samples/OpenIdProviderWebForms/Code/CustomStoreDataSet.Designer.cs
+++ b/samples/OpenIdProviderWebForms/Code/CustomStoreDataSet.Designer.cs
@@ -27,6 +27,8 @@ namespace OpenIdProviderWebForms.Code {
private AssociationDataTable tableAssociation;
+ private NonceDataTable tableNonce;
+
private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -56,6 +58,9 @@ namespace OpenIdProviderWebForms.Code {
if ((ds.Tables["Association"] != null)) {
base.Tables.Add(new AssociationDataTable(ds.Tables["Association"]));
}
+ if ((ds.Tables["Nonce"] != null)) {
+ base.Tables.Add(new NonceDataTable(ds.Tables["Nonce"]));
+ }
this.DataSetName = ds.DataSetName;
this.Prefix = ds.Prefix;
this.Namespace = ds.Namespace;
@@ -84,6 +89,15 @@ namespace OpenIdProviderWebForms.Code {
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.ComponentModel.Browsable(false)]
+ [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
+ public NonceDataTable Nonce {
+ get {
+ return this.tableNonce;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.BrowsableAttribute(true)]
[global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)]
public override global::System.Data.SchemaSerializationMode SchemaSerializationMode {
@@ -145,6 +159,9 @@ namespace OpenIdProviderWebForms.Code {
if ((ds.Tables["Association"] != null)) {
base.Tables.Add(new AssociationDataTable(ds.Tables["Association"]));
}
+ if ((ds.Tables["Nonce"] != null)) {
+ base.Tables.Add(new NonceDataTable(ds.Tables["Nonce"]));
+ }
this.DataSetName = ds.DataSetName;
this.Prefix = ds.Prefix;
this.Namespace = ds.Namespace;
@@ -181,6 +198,12 @@ namespace OpenIdProviderWebForms.Code {
this.tableAssociation.InitVars();
}
}
+ this.tableNonce = ((NonceDataTable)(base.Tables["Nonce"]));
+ if ((initTable == true)) {
+ if ((this.tableNonce != null)) {
+ this.tableNonce.InitVars();
+ }
+ }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -192,6 +215,8 @@ namespace OpenIdProviderWebForms.Code {
this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
this.tableAssociation = new AssociationDataTable();
base.Tables.Add(this.tableAssociation);
+ this.tableNonce = new NonceDataTable();
+ base.Tables.Add(this.tableNonce);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -200,6 +225,11 @@ namespace OpenIdProviderWebForms.Code {
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ private bool ShouldSerializeNonce() {
+ return false;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {
if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) {
this.InitVars();
@@ -254,6 +284,8 @@ namespace OpenIdProviderWebForms.Code {
public delegate void AssociationRowChangeEventHandler(object sender, AssociationRowChangeEvent e);
+ public delegate void NonceRowChangeEventHandler(object sender, NonceRowChangeEvent e);
+
/// <summary>
///Represents the strongly named DataTable class.
///</summary>
@@ -531,6 +563,267 @@ namespace OpenIdProviderWebForms.Code {
}
/// <summary>
+ ///Represents the strongly named DataTable class.
+ ///</summary>
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
+ [global::System.Serializable()]
+ [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
+ public partial class NonceDataTable : global::System.Data.TypedTableBase<NonceRow> {
+
+ private global::System.Data.DataColumn columnCode;
+
+ private global::System.Data.DataColumn columnIssued;
+
+ private global::System.Data.DataColumn columnExpires;
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public NonceDataTable() {
+ this.TableName = "Nonce";
+ this.BeginInit();
+ this.InitClass();
+ this.EndInit();
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ internal NonceDataTable(global::System.Data.DataTable table) {
+ this.TableName = table.TableName;
+ if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
+ this.CaseSensitive = table.CaseSensitive;
+ }
+ if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
+ this.Locale = table.Locale;
+ }
+ if ((table.Namespace != table.DataSet.Namespace)) {
+ this.Namespace = table.Namespace;
+ }
+ this.Prefix = table.Prefix;
+ this.MinimumCapacity = table.MinimumCapacity;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ protected NonceDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
+ base(info, context) {
+ this.InitVars();
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public global::System.Data.DataColumn CodeColumn {
+ get {
+ return this.columnCode;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public global::System.Data.DataColumn IssuedColumn {
+ get {
+ return this.columnIssued;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public global::System.Data.DataColumn ExpiresColumn {
+ get {
+ return this.columnExpires;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.ComponentModel.Browsable(false)]
+ public int Count {
+ get {
+ return this.Rows.Count;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public NonceRow this[int index] {
+ get {
+ return ((NonceRow)(this.Rows[index]));
+ }
+ }
+
+ public event NonceRowChangeEventHandler NonceRowChanging;
+
+ public event NonceRowChangeEventHandler NonceRowChanged;
+
+ public event NonceRowChangeEventHandler NonceRowDeleting;
+
+ public event NonceRowChangeEventHandler NonceRowDeleted;
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void AddNonceRow(NonceRow row) {
+ this.Rows.Add(row);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public NonceRow AddNonceRow(string Code, System.DateTime Issued, System.DateTime Expires) {
+ NonceRow rowNonceRow = ((NonceRow)(this.NewRow()));
+ object[] columnValuesArray = new object[] {
+ Code,
+ Issued,
+ Expires};
+ rowNonceRow.ItemArray = columnValuesArray;
+ this.Rows.Add(rowNonceRow);
+ return rowNonceRow;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public NonceRow FindByCode(string Code) {
+ return ((NonceRow)(this.Rows.Find(new object[] {
+ Code})));
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public override global::System.Data.DataTable Clone() {
+ NonceDataTable cln = ((NonceDataTable)(base.Clone()));
+ cln.InitVars();
+ return cln;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ protected override global::System.Data.DataTable CreateInstance() {
+ return new NonceDataTable();
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ internal void InitVars() {
+ this.columnCode = base.Columns["Code"];
+ this.columnIssued = base.Columns["Issued"];
+ this.columnExpires = base.Columns["Expires"];
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ private void InitClass() {
+ this.columnCode = new global::System.Data.DataColumn("Code", typeof(string), null, global::System.Data.MappingType.Element);
+ base.Columns.Add(this.columnCode);
+ this.columnIssued = new global::System.Data.DataColumn("Issued", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element);
+ base.Columns.Add(this.columnIssued);
+ this.columnExpires = new global::System.Data.DataColumn("Expires", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element);
+ base.Columns.Add(this.columnExpires);
+ this.Constraints.Add(new global::System.Data.UniqueConstraint("PrimaryKey", new global::System.Data.DataColumn[] {
+ this.columnCode}, true));
+ this.columnCode.AllowDBNull = false;
+ this.columnCode.Unique = true;
+ this.columnIssued.AllowDBNull = false;
+ this.columnExpires.AllowDBNull = false;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public NonceRow NewNonceRow() {
+ return ((NonceRow)(this.NewRow()));
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
+ return new NonceRow(builder);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ protected override global::System.Type GetRowType() {
+ return typeof(NonceRow);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
+ base.OnRowChanged(e);
+ if ((this.NonceRowChanged != null)) {
+ this.NonceRowChanged(this, new NonceRowChangeEvent(((NonceRow)(e.Row)), e.Action));
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
+ base.OnRowChanging(e);
+ if ((this.NonceRowChanging != null)) {
+ this.NonceRowChanging(this, new NonceRowChangeEvent(((NonceRow)(e.Row)), e.Action));
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
+ base.OnRowDeleted(e);
+ if ((this.NonceRowDeleted != null)) {
+ this.NonceRowDeleted(this, new NonceRowChangeEvent(((NonceRow)(e.Row)), e.Action));
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
+ base.OnRowDeleting(e);
+ if ((this.NonceRowDeleting != null)) {
+ this.NonceRowDeleting(this, new NonceRowChangeEvent(((NonceRow)(e.Row)), e.Action));
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void RemoveNonceRow(NonceRow row) {
+ this.Rows.Remove(row);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
+ global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
+ global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
+ CustomStoreDataSet ds = new CustomStoreDataSet();
+ global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
+ any1.Namespace = "http://www.w3.org/2001/XMLSchema";
+ any1.MinOccurs = new decimal(0);
+ any1.MaxOccurs = decimal.MaxValue;
+ any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
+ sequence.Items.Add(any1);
+ global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
+ any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
+ any2.MinOccurs = new decimal(1);
+ any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
+ sequence.Items.Add(any2);
+ global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
+ attribute1.Name = "namespace";
+ attribute1.FixedValue = ds.Namespace;
+ type.Attributes.Add(attribute1);
+ global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
+ attribute2.Name = "tableTypeName";
+ attribute2.FixedValue = "NonceDataTable";
+ type.Attributes.Add(attribute2);
+ type.Particle = sequence;
+ global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
+ if (xs.Contains(dsSchema.TargetNamespace)) {
+ global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
+ global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
+ try {
+ global::System.Xml.Schema.XmlSchema schema = null;
+ dsSchema.Write(s1);
+ for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
+ schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
+ s2.SetLength(0);
+ schema.Write(s2);
+ if ((s1.Length == s2.Length)) {
+ s1.Position = 0;
+ s2.Position = 0;
+ for (; ((s1.Position != s1.Length)
+ && (s1.ReadByte() == s2.ReadByte())); ) {
+ ;
+ }
+ if ((s1.Position == s1.Length)) {
+ return type;
+ }
+ }
+ }
+ }
+ finally {
+ if ((s1 != null)) {
+ s1.Close();
+ }
+ if ((s2 != null)) {
+ s2.Close();
+ }
+ }
+ }
+ xs.Add(dsSchema);
+ return type;
+ }
+ }
+
+ /// <summary>
///Represents strongly named DataRow class.
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
@@ -586,6 +879,51 @@ namespace OpenIdProviderWebForms.Code {
}
/// <summary>
+ ///Represents strongly named DataRow class.
+ ///</summary>
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
+ public partial class NonceRow : global::System.Data.DataRow {
+
+ private NonceDataTable tableNonce;
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ internal NonceRow(global::System.Data.DataRowBuilder rb) :
+ base(rb) {
+ this.tableNonce = ((NonceDataTable)(this.Table));
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public string Code {
+ get {
+ return ((string)(this[this.tableNonce.CodeColumn]));
+ }
+ set {
+ this[this.tableNonce.CodeColumn] = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public System.DateTime Issued {
+ get {
+ return ((global::System.DateTime)(this[this.tableNonce.IssuedColumn]));
+ }
+ set {
+ this[this.tableNonce.IssuedColumn] = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public System.DateTime Expires {
+ get {
+ return ((global::System.DateTime)(this[this.tableNonce.ExpiresColumn]));
+ }
+ set {
+ this[this.tableNonce.ExpiresColumn] = value;
+ }
+ }
+ }
+
+ /// <summary>
///Row event argument class
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
@@ -615,6 +953,37 @@ namespace OpenIdProviderWebForms.Code {
}
}
}
+
+ /// <summary>
+ ///Row event argument class
+ ///</summary>
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
+ public class NonceRowChangeEvent : global::System.EventArgs {
+
+ private NonceRow eventRow;
+
+ private global::System.Data.DataRowAction eventAction;
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public NonceRowChangeEvent(NonceRow row, global::System.Data.DataRowAction action) {
+ this.eventRow = row;
+ this.eventAction = action;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public NonceRow Row {
+ get {
+ return this.eventRow;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public global::System.Data.DataRowAction Action {
+ get {
+ return this.eventAction;
+ }
+ }
+ }
}
}
diff --git a/samples/OpenIdProviderWebForms/Code/CustomStoreDataSet.xsd b/samples/OpenIdProviderWebForms/Code/CustomStoreDataSet.xsd
index 63226bd..d796d88 100644
--- a/samples/OpenIdProviderWebForms/Code/CustomStoreDataSet.xsd
+++ b/samples/OpenIdProviderWebForms/Code/CustomStoreDataSet.xsd
@@ -15,10 +15,19 @@
<xs:element name="Association" msprop:Generator_UserTableName="Association" msprop:Generator_RowDeletedName="AssociationRowDeleted" msprop:Generator_RowChangedName="AssociationRowChanged" msprop:Generator_RowClassName="AssociationRow" msprop:Generator_RowChangingName="AssociationRowChanging" msprop:Generator_RowEvArgName="AssociationRowChangeEvent" msprop:Generator_RowEvHandlerName="AssociationRowChangeEventHandler" msprop:Generator_TableClassName="AssociationDataTable" msprop:Generator_TableVarName="tableAssociation" msprop:Generator_RowDeletingName="AssociationRowDeleting" msprop:Generator_TablePropName="Association">
<xs:complexType>
<xs:sequence>
- <xs:element name="DistinguishingFactor" msprop:Generator_UserColumnName="DistinguishingFactor" msprop:Generator_ColumnPropNameInRow="DistinguishingFactor" msprop:Generator_ColumnVarNameInTable="columnDistinguishingFactor" msprop:Generator_ColumnPropNameInTable="DistinguishingFactorColumn" type="xs:string" />
- <xs:element name="Handle" msprop:Generator_UserColumnName="Handle" msprop:Generator_ColumnPropNameInRow="Handle" msprop:Generator_ColumnVarNameInTable="columnHandle" msprop:Generator_ColumnPropNameInTable="HandleColumn" type="xs:string" />
+ <xs:element name="DistinguishingFactor" msprop:Generator_UserColumnName="DistinguishingFactor" msprop:Generator_ColumnVarNameInTable="columnDistinguishingFactor" msprop:Generator_ColumnPropNameInRow="DistinguishingFactor" msprop:Generator_ColumnPropNameInTable="DistinguishingFactorColumn" type="xs:string" />
+ <xs:element name="Handle" msprop:Generator_UserColumnName="Handle" msprop:Generator_ColumnVarNameInTable="columnHandle" msprop:Generator_ColumnPropNameInRow="Handle" msprop:Generator_ColumnPropNameInTable="HandleColumn" type="xs:string" />
+ <xs:element name="Expires" msprop:Generator_UserColumnName="Expires" msprop:Generator_ColumnVarNameInTable="columnExpires" msprop:Generator_ColumnPropNameInRow="Expires" msprop:Generator_ColumnPropNameInTable="ExpiresColumn" type="xs:dateTime" />
+ <xs:element name="PrivateData" msprop:Generator_UserColumnName="PrivateData" msprop:Generator_ColumnVarNameInTable="columnPrivateData" msprop:Generator_ColumnPropNameInRow="PrivateData" msprop:Generator_ColumnPropNameInTable="PrivateDataColumn" type="xs:base64Binary" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="Nonce" msprop:Generator_UserTableName="Nonce" msprop:Generator_RowDeletedName="NonceRowDeleted" msprop:Generator_TableClassName="NonceDataTable" msprop:Generator_RowChangedName="NonceRowChanged" msprop:Generator_RowClassName="NonceRow" msprop:Generator_RowChangingName="NonceRowChanging" msprop:Generator_RowEvArgName="NonceRowChangeEvent" msprop:Generator_RowEvHandlerName="NonceRowChangeEventHandler" msprop:Generator_TablePropName="Nonce" msprop:Generator_TableVarName="tableNonce" msprop:Generator_RowDeletingName="NonceRowDeleting">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Code" msprop:Generator_UserColumnName="Code" msprop:Generator_ColumnPropNameInRow="Code" msprop:Generator_ColumnVarNameInTable="columnCode" msprop:Generator_ColumnPropNameInTable="CodeColumn" type="xs:string" />
+ <xs:element name="Issued" msprop:Generator_UserColumnName="Issued" msprop:Generator_ColumnPropNameInRow="Issued" msprop:Generator_ColumnVarNameInTable="columnIssued" msprop:Generator_ColumnPropNameInTable="IssuedColumn" type="xs:dateTime" />
<xs:element name="Expires" msprop:Generator_UserColumnName="Expires" msprop:Generator_ColumnPropNameInRow="Expires" msprop:Generator_ColumnVarNameInTable="columnExpires" msprop:Generator_ColumnPropNameInTable="ExpiresColumn" type="xs:dateTime" />
- <xs:element name="PrivateData" msprop:Generator_UserColumnName="PrivateData" msprop:Generator_ColumnPropNameInRow="PrivateData" msprop:Generator_ColumnVarNameInTable="columnPrivateData" msprop:Generator_ColumnPropNameInTable="PrivateDataColumn" type="xs:base64Binary" />
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -29,5 +38,9 @@
<xs:field xpath="mstns:DistinguishingFactor" />
<xs:field xpath="mstns:Handle" />
</xs:unique>
+ <xs:unique name="Nonce_PrimaryKey" msdata:ConstraintName="PrimaryKey" msdata:PrimaryKey="true">
+ <xs:selector xpath=".//mstns:Nonce" />
+ <xs:field xpath="mstns:Code" />
+ </xs:unique>
</xs:element>
</xs:schema> \ No newline at end of file
diff --git a/samples/OpenIdProviderWebForms/Code/CustomStoreDataSet.xss b/samples/OpenIdProviderWebForms/Code/CustomStoreDataSet.xss
index 0b3972e..ede3b42 100644
--- a/samples/OpenIdProviderWebForms/Code/CustomStoreDataSet.xss
+++ b/samples/OpenIdProviderWebForms/Code/CustomStoreDataSet.xss
@@ -4,9 +4,10 @@
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
</autogenerated>-->
-<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="0" ViewPortY="0" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
+<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="-10" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
- <Shape ID="DesignTable:Association" ZOrder="1" X="349" Y="83" Height="105" Width="154" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="101" />
+ <Shape ID="DesignTable:Association" ZOrder="2" X="349" Y="83" Height="105" Width="154" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="101" />
+ <Shape ID="DesignTable:Nonce" ZOrder="1" X="567" Y="77" Height="86" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="86" />
</Shapes>
<Connectors />
</DiagramLayout> \ No newline at end of file