diff options
Diffstat (limited to 'samples/RelyingPartyCustomStore')
17 files changed, 0 insertions, 1558 deletions
diff --git a/samples/RelyingPartyCustomStore/.gitignore b/samples/RelyingPartyCustomStore/.gitignore deleted file mode 100644 index 0986274..0000000 --- a/samples/RelyingPartyCustomStore/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -Bin -obj -*Trace.txt -*.user diff --git a/samples/RelyingPartyCustomStore/CustomStore.cs b/samples/RelyingPartyCustomStore/CustomStore.cs deleted file mode 100644 index b0e3700..0000000 --- a/samples/RelyingPartyCustomStore/CustomStore.cs +++ /dev/null @@ -1,120 +0,0 @@ -using System;
-using System.Data;
-using System.Globalization;
-using System.Security.Cryptography;
-using DotNetOpenId;
-using DotNetOpenId.RelyingParty;
-
-namespace RelyingPartyCustomStore {
- /// <summary>
- /// This custom store serializes all elements to demonstrate peristent and/or shared storage.
- /// This is common in a web farm, for example.
- /// </summary>
- /// <remarks>
- /// This doesn't actually serialize anything to a persistent store, so restarting the web server
- /// will still clear everything this store is supposed to remember.
- /// But we "persist" all associations and nonces into a DataTable to demonstrate
- /// that using a database is possible.
- /// </remarks>
- public class CustomStore : IRelyingPartyApplicationStore {
- public static CustomStore Instance = new CustomStore();
- public CustomStoreDataSet dataSet = new CustomStoreDataSet();
-
- #region IAssociationStore<Uri> Members
-
- public void StoreAssociation(Uri distinguishingFactor, Association assoc) {
- var assocRow = dataSet.Association.NewAssociationRow();
- assocRow.DistinguishingFactor = distinguishingFactor.AbsoluteUri;
- assocRow.Handle = assoc.Handle;
- assocRow.Expires = assoc.Expires.ToLocalTime();
- assocRow.PrivateData = assoc.SerializePrivateData();
- dataSet.Association.AddAssociationRow(assocRow);
- }
-
- public Association GetAssociation(Uri distinguishingFactor) {
- // properly escape the URL to prevent injection attacks.
- string value = distinguishingFactor.AbsoluteUri.Replace("'", "''");
- string filter = string.Format(CultureInfo.InvariantCulture, "{0} = '{1}'",
- dataSet.Association.DistinguishingFactorColumn.ColumnName, value);
- string sort = dataSet.Association.ExpiresColumn.ColumnName + " DESC";
- DataView view = new DataView(dataSet.Association, filter, sort, DataViewRowState.CurrentRows);
- if (view.Count == 0) return null;
- var row = (CustomStoreDataSet.AssociationRow)view[0].Row;
- return Association.Deserialize(row.Handle, row.Expires.ToUniversalTime(), row.PrivateData);
- }
-
- public Association GetAssociation(Uri distinguishingFactor, string handle) {
- var assocRow = dataSet.Association.FindByDistinguishingFactorHandle(distinguishingFactor.AbsoluteUri, handle);
- return Association.Deserialize(assocRow.Handle, assocRow.Expires, assocRow.PrivateData);
- }
-
- public bool RemoveAssociation(Uri distinguishingFactor, string handle) {
- var row = dataSet.Association.FindByDistinguishingFactorHandle(distinguishingFactor.AbsoluteUri, handle);
- if (row != null) {
- dataSet.Association.RemoveAssociationRow(row);
- return true;
- } else {
- return false;
- }
- }
-
- public void ClearExpiredAssociations() {
- removeExpiredRows(dataSet.Association, dataSet.Association.ExpiresColumn.ColumnName);
- }
-
- #endregion
-
- #region INonceStore Members
-
- byte[] secretSigningKey;
- public byte[] SecretSigningKey {
- get {
- if (secretSigningKey == null) {
- lock (this) {
- if (secretSigningKey == null) {
- // initialize in a local variable before setting in field for thread safety.
- byte[] auth_key = new byte[64];
- new RNGCryptoServiceProvider().GetBytes(auth_key);
- this.secretSigningKey = auth_key;
- }
- }
- }
- return secretSigningKey;
- }
- }
-
- public bool TryStoreNonce(Nonce nonce) {
- // 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.Code) != null) return false;
- dataSet.Nonce.AddNonceRow(nonce.Code, nonce.ExpirationDate.ToLocalTime());
- return true;
- }
- }
-
- public void ClearExpiredNonces() {
- removeExpiredRows(dataSet.Nonce, dataSet.Nonce.ExpiresColumn.ColumnName);
- }
-
- #endregion
-
- void removeExpiredRows(DataTable table, string expiredColumnName) {
- string filter = string.Format(CultureInfo.InvariantCulture, "{0} < #{1}#",
- expiredColumnName, DateTime.Now);
- DataView view = new DataView(table, filter, null, DataViewRowState.CurrentRows);
- for (int i = view.Count - 1; i >= 0; i--)
- view.Delete(i);
- }
-
- }
-}
diff --git a/samples/RelyingPartyCustomStore/CustomStoreDataSet.Designer.cs b/samples/RelyingPartyCustomStore/CustomStoreDataSet.Designer.cs deleted file mode 100644 index b757e71..0000000 --- a/samples/RelyingPartyCustomStore/CustomStoreDataSet.Designer.cs +++ /dev/null @@ -1,976 +0,0 @@ -//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Runtime Version:2.0.50727.1434
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591
-
-namespace RelyingPartyCustomStore {
-
-
- /// <summary>
- ///Represents a strongly typed in-memory cache of data.
- ///</summary>
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
- [global::System.Serializable()]
- [global::System.ComponentModel.DesignerCategoryAttribute("code")]
- [global::System.ComponentModel.ToolboxItem(true)]
- [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")]
- [global::System.Xml.Serialization.XmlRootAttribute("CustomStoreDataSet")]
- [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
- public partial class CustomStoreDataSet : global::System.Data.DataSet {
-
- private AssociationDataTable tableAssociation;
-
- private NonceDataTable tableNonce;
-
- private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public CustomStoreDataSet() {
- this.BeginInit();
- this.InitClass();
- global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
- base.Tables.CollectionChanged += schemaChangedHandler;
- base.Relations.CollectionChanged += schemaChangedHandler;
- this.EndInit();
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- protected CustomStoreDataSet(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
- base(info, context, false) {
- if ((this.IsBinarySerialized(info, context) == true)) {
- this.InitVars(false);
- global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
- this.Tables.CollectionChanged += schemaChangedHandler1;
- this.Relations.CollectionChanged += schemaChangedHandler1;
- return;
- }
- string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
- if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
- global::System.Data.DataSet ds = new global::System.Data.DataSet();
- ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
- 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;
- this.Locale = ds.Locale;
- this.CaseSensitive = ds.CaseSensitive;
- this.EnforceConstraints = ds.EnforceConstraints;
- this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
- this.InitVars();
- }
- else {
- this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
- }
- this.GetSerializationData(info, context);
- global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
- base.Tables.CollectionChanged += schemaChangedHandler;
- this.Relations.CollectionChanged += schemaChangedHandler;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.ComponentModel.Browsable(false)]
- [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
- public AssociationDataTable Association {
- get {
- return this.tableAssociation;
- }
- }
-
- [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 {
- get {
- return this._schemaSerializationMode;
- }
- set {
- this._schemaSerializationMode = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
- public new global::System.Data.DataTableCollection Tables {
- get {
- return base.Tables;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
- public new global::System.Data.DataRelationCollection Relations {
- get {
- return base.Relations;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- protected override void InitializeDerivedDataSet() {
- this.BeginInit();
- this.InitClass();
- this.EndInit();
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public override global::System.Data.DataSet Clone() {
- CustomStoreDataSet cln = ((CustomStoreDataSet)(base.Clone()));
- cln.InitVars();
- cln.SchemaSerializationMode = this.SchemaSerializationMode;
- return cln;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- protected override bool ShouldSerializeTables() {
- return false;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- protected override bool ShouldSerializeRelations() {
- return false;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) {
- if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
- this.Reset();
- global::System.Data.DataSet ds = new global::System.Data.DataSet();
- ds.ReadXml(reader);
- 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;
- this.Locale = ds.Locale;
- this.CaseSensitive = ds.CaseSensitive;
- this.EnforceConstraints = ds.EnforceConstraints;
- this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
- this.InitVars();
- }
- else {
- this.ReadXml(reader);
- this.InitVars();
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() {
- global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream();
- this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null));
- stream.Position = 0;
- return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- internal void InitVars() {
- this.InitVars(true);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- internal void InitVars(bool initTable) {
- this.tableAssociation = ((AssociationDataTable)(base.Tables["Association"]));
- if ((initTable == true)) {
- if ((this.tableAssociation != null)) {
- this.tableAssociation.InitVars();
- }
- }
- this.tableNonce = ((NonceDataTable)(base.Tables["Nonce"]));
- if ((initTable == true)) {
- if ((this.tableNonce != null)) {
- this.tableNonce.InitVars();
- }
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- private void InitClass() {
- this.DataSetName = "CustomStoreDataSet";
- this.Prefix = "";
- this.Namespace = "http://tempuri.org/CustomStoreDataSet.xsd";
- this.EnforceConstraints = true;
- 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()]
- private bool ShouldSerializeAssociation() {
- return false;
- }
-
- [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();
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
- CustomStoreDataSet ds = new CustomStoreDataSet();
- global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
- global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
- global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny();
- any.Namespace = ds.Namespace;
- sequence.Items.Add(any);
- 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;
- }
-
- public delegate void AssociationRowChangeEventHandler(object sender, AssociationRowChangeEvent e);
-
- public delegate void NonceRowChangeEventHandler(object sender, NonceRowChangeEvent e);
-
- /// <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 AssociationDataTable : global::System.Data.DataTable, global::System.Collections.IEnumerable {
-
- private global::System.Data.DataColumn columnDistinguishingFactor;
-
- private global::System.Data.DataColumn columnHandle;
-
- private global::System.Data.DataColumn columnExpires;
-
- private global::System.Data.DataColumn columnPrivateData;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public AssociationDataTable() {
- this.TableName = "Association";
- this.BeginInit();
- this.InitClass();
- this.EndInit();
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- internal AssociationDataTable(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 AssociationDataTable(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 DistinguishingFactorColumn {
- get {
- return this.columnDistinguishingFactor;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public global::System.Data.DataColumn HandleColumn {
- get {
- return this.columnHandle;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public global::System.Data.DataColumn ExpiresColumn {
- get {
- return this.columnExpires;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public global::System.Data.DataColumn PrivateDataColumn {
- get {
- return this.columnPrivateData;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.ComponentModel.Browsable(false)]
- public int Count {
- get {
- return this.Rows.Count;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public AssociationRow this[int index] {
- get {
- return ((AssociationRow)(this.Rows[index]));
- }
- }
-
- public event AssociationRowChangeEventHandler AssociationRowChanging;
-
- public event AssociationRowChangeEventHandler AssociationRowChanged;
-
- public event AssociationRowChangeEventHandler AssociationRowDeleting;
-
- public event AssociationRowChangeEventHandler AssociationRowDeleted;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public void AddAssociationRow(AssociationRow row) {
- this.Rows.Add(row);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public AssociationRow AddAssociationRow(string DistinguishingFactor, string Handle, System.DateTime Expires, byte[] PrivateData) {
- AssociationRow rowAssociationRow = ((AssociationRow)(this.NewRow()));
- object[] columnValuesArray = new object[] {
- DistinguishingFactor,
- Handle,
- Expires,
- PrivateData};
- rowAssociationRow.ItemArray = columnValuesArray;
- this.Rows.Add(rowAssociationRow);
- return rowAssociationRow;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public AssociationRow FindByDistinguishingFactorHandle(string DistinguishingFactor, string Handle) {
- return ((AssociationRow)(this.Rows.Find(new object[] {
- DistinguishingFactor,
- Handle})));
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public virtual global::System.Collections.IEnumerator GetEnumerator() {
- return this.Rows.GetEnumerator();
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public override global::System.Data.DataTable Clone() {
- AssociationDataTable cln = ((AssociationDataTable)(base.Clone()));
- cln.InitVars();
- return cln;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- protected override global::System.Data.DataTable CreateInstance() {
- return new AssociationDataTable();
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- internal void InitVars() {
- this.columnDistinguishingFactor = base.Columns["DistinguishingFactor"];
- this.columnHandle = base.Columns["Handle"];
- this.columnExpires = base.Columns["Expires"];
- this.columnPrivateData = base.Columns["PrivateData"];
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- private void InitClass() {
- this.columnDistinguishingFactor = new global::System.Data.DataColumn("DistinguishingFactor", typeof(string), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnDistinguishingFactor);
- this.columnHandle = new global::System.Data.DataColumn("Handle", typeof(string), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnHandle);
- this.columnExpires = new global::System.Data.DataColumn("Expires", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnExpires);
- this.columnPrivateData = new global::System.Data.DataColumn("PrivateData", typeof(byte[]), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnPrivateData);
- this.Constraints.Add(new global::System.Data.UniqueConstraint("PrimaryKey", new global::System.Data.DataColumn[] {
- this.columnDistinguishingFactor,
- this.columnHandle}, true));
- this.columnDistinguishingFactor.AllowDBNull = false;
- this.columnHandle.AllowDBNull = false;
- this.columnExpires.AllowDBNull = false;
- this.columnPrivateData.AllowDBNull = false;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public AssociationRow NewAssociationRow() {
- return ((AssociationRow)(this.NewRow()));
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
- return new AssociationRow(builder);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- protected override global::System.Type GetRowType() {
- return typeof(AssociationRow);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
- base.OnRowChanged(e);
- if ((this.AssociationRowChanged != null)) {
- this.AssociationRowChanged(this, new AssociationRowChangeEvent(((AssociationRow)(e.Row)), e.Action));
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
- base.OnRowChanging(e);
- if ((this.AssociationRowChanging != null)) {
- this.AssociationRowChanging(this, new AssociationRowChangeEvent(((AssociationRow)(e.Row)), e.Action));
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
- base.OnRowDeleted(e);
- if ((this.AssociationRowDeleted != null)) {
- this.AssociationRowDeleted(this, new AssociationRowChangeEvent(((AssociationRow)(e.Row)), e.Action));
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
- base.OnRowDeleting(e);
- if ((this.AssociationRowDeleting != null)) {
- this.AssociationRowDeleting(this, new AssociationRowChangeEvent(((AssociationRow)(e.Row)), e.Action));
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public void RemoveAssociationRow(AssociationRow 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 = "AssociationDataTable";
- 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 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.DataTable, global::System.Collections.IEnumerable {
-
- private global::System.Data.DataColumn columnCode;
-
- 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 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 Expires) {
- NonceRow rowNonceRow = ((NonceRow)(this.NewRow()));
- object[] columnValuesArray = new object[] {
- Code,
- 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 virtual global::System.Collections.IEnumerator GetEnumerator() {
- return this.Rows.GetEnumerator();
- }
-
- [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.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.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.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")]
- public partial class AssociationRow : global::System.Data.DataRow {
-
- private AssociationDataTable tableAssociation;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- internal AssociationRow(global::System.Data.DataRowBuilder rb) :
- base(rb) {
- this.tableAssociation = ((AssociationDataTable)(this.Table));
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public string DistinguishingFactor {
- get {
- return ((string)(this[this.tableAssociation.DistinguishingFactorColumn]));
- }
- set {
- this[this.tableAssociation.DistinguishingFactorColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public string Handle {
- get {
- return ((string)(this[this.tableAssociation.HandleColumn]));
- }
- set {
- this[this.tableAssociation.HandleColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public System.DateTime Expires {
- get {
- return ((global::System.DateTime)(this[this.tableAssociation.ExpiresColumn]));
- }
- set {
- this[this.tableAssociation.ExpiresColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public byte[] PrivateData {
- get {
- return ((byte[])(this[this.tableAssociation.PrivateDataColumn]));
- }
- set {
- this[this.tableAssociation.PrivateDataColumn] = value;
- }
- }
- }
-
- /// <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 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")]
- public class AssociationRowChangeEvent : global::System.EventArgs {
-
- private AssociationRow eventRow;
-
- private global::System.Data.DataRowAction eventAction;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public AssociationRowChangeEvent(AssociationRow row, global::System.Data.DataRowAction action) {
- this.eventRow = row;
- this.eventAction = action;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public AssociationRow Row {
- get {
- return this.eventRow;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public global::System.Data.DataRowAction Action {
- get {
- return this.eventAction;
- }
- }
- }
-
- /// <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;
- }
- }
- }
- }
-}
-
-#pragma warning restore 1591
\ No newline at end of file diff --git a/samples/RelyingPartyCustomStore/CustomStoreDataSet.xsc b/samples/RelyingPartyCustomStore/CustomStoreDataSet.xsc deleted file mode 100644 index 551fc56..0000000 --- a/samples/RelyingPartyCustomStore/CustomStoreDataSet.xsc +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<!--<autogenerated>
- This code was generated by a tool.
- Changes to this file may cause incorrect behavior and will be lost if
- the code is regenerated.
-</autogenerated>-->
-<DataSetUISetting Version="1.00" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
- <TableUISettings />
-</DataSetUISetting>
\ No newline at end of file diff --git a/samples/RelyingPartyCustomStore/CustomStoreDataSet.xsd b/samples/RelyingPartyCustomStore/CustomStoreDataSet.xsd deleted file mode 100644 index 76b77aa..0000000 --- a/samples/RelyingPartyCustomStore/CustomStoreDataSet.xsd +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<xs:schema id="CustomStoreDataSet" targetNamespace="http://tempuri.org/CustomStoreDataSet.xsd" xmlns:mstns="http://tempuri.org/CustomStoreDataSet.xsd" xmlns="http://tempuri.org/CustomStoreDataSet.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
- <xs:annotation>
- <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
- <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
- <Connections />
- <Tables />
- <Sources />
- </DataSource>
- </xs:appinfo>
- </xs:annotation>
- <xs:element name="CustomStoreDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="CustomStoreDataSet" msprop:Generator_DataSetName="CustomStoreDataSet" msprop:EnableTableAdapterManager="true">
- <xs:complexType>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <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_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="Expires" msprop:Generator_UserColumnName="Expires" msprop:Generator_ColumnPropNameInRow="Expires" msprop:Generator_ColumnVarNameInTable="columnExpires" msprop:Generator_ColumnPropNameInTable="ExpiresColumn" type="xs:dateTime" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- </xs:choice>
- </xs:complexType>
- <xs:unique name="PrimaryKey" msdata:PrimaryKey="true">
- <xs:selector xpath=".//mstns:Association" />
- <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/RelyingPartyCustomStore/CustomStoreDataSet.xss b/samples/RelyingPartyCustomStore/CustomStoreDataSet.xss deleted file mode 100644 index fbe7113..0000000 --- a/samples/RelyingPartyCustomStore/CustomStoreDataSet.xss +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<!--<autogenerated>
- This code was generated by a tool to store the dataset designer's layout information.
- 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">
- <Shapes>
- <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="604" Y="86" Height="67" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="63" />
- </Shapes>
- <Connectors />
-</DiagramLayout>
\ No newline at end of file diff --git a/samples/RelyingPartyCustomStore/Default.aspx b/samples/RelyingPartyCustomStore/Default.aspx deleted file mode 100644 index 445b3a9..0000000 --- a/samples/RelyingPartyCustomStore/Default.aspx +++ /dev/null @@ -1,30 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" %>
-
-<%@ Register Assembly="DotNetOpenId" Namespace="DotNetOpenId" TagPrefix="openid" %>
-<!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>OpenID Relying Party, by DotNetOpenId</title>
- <openid:XrdsPublisher runat="server" XrdsUrl="~/xrds.aspx" />
-</head>
-<body>
- <form id="form1" runat="server">
- <h1>
- OpenID Relying Party, with custom store
- </h1>
- <h2>
- Provided by <a href="http://dotnetopenid.googlecode.com">DotNetOpenId</a>
- </h2>
- <p>
- This sample implements a custom store for associations and nonces, which can be useful
- when deploying a relying party site on a web farm.
- </p>
- <p>
- Visit the
- <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/MembersOnly/Default.aspx"
- Text="Members Only" />
- area. (This will trigger a login demo).
- </p>
- </form>
-</body>
-</html>
diff --git a/samples/RelyingPartyCustomStore/Global.asax b/samples/RelyingPartyCustomStore/Global.asax deleted file mode 100644 index a00a077..0000000 --- a/samples/RelyingPartyCustomStore/Global.asax +++ /dev/null @@ -1 +0,0 @@ -<%@ Application Codebehind="Global.asax.cs" Inherits="RelyingPartyCustomStore.Global" Language="C#" %>
diff --git a/samples/RelyingPartyCustomStore/Global.asax.cs b/samples/RelyingPartyCustomStore/Global.asax.cs deleted file mode 100644 index b8b7593..0000000 --- a/samples/RelyingPartyCustomStore/Global.asax.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System;
-using System.Collections;
-using System.Configuration;
-using System.Data;
-using System.Web;
-using System.Web.Security;
-using System.Web.SessionState;
-
-namespace RelyingPartyCustomStore {
- public class Global : System.Web.HttpApplication {
- public Global() {
- // since this is a sample, and will often be used with localhost
- DotNetOpenId.UntrustedWebRequest.WhitelistHosts.Add("localhost");
- }
- }
-}
\ No newline at end of file diff --git a/samples/RelyingPartyCustomStore/MembersOnly/Default.aspx b/samples/RelyingPartyCustomStore/MembersOnly/Default.aspx deleted file mode 100644 index ae974cc..0000000 --- a/samples/RelyingPartyCustomStore/MembersOnly/Default.aspx +++ /dev/null @@ -1,21 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" %>
-
-<!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 runat="server">
- <title>Welcome OpenID User!</title>
-</head>
-<body>
- <form id="form1" runat="server">
- <h1>
- Members Only Area
- </h1>
- <p>
- Congratulations, <b>
- <asp:LoginName ID="LoginName1" runat="server" />
- </b>. You have completed the OpenID login process.
- </p>
- <asp:LoginStatus ID="LoginStatus1" runat="server" />
- </form>
-</body>
-</html>
diff --git a/samples/RelyingPartyCustomStore/MembersOnly/Web.config b/samples/RelyingPartyCustomStore/MembersOnly/Web.config deleted file mode 100644 index 7fbfa59..0000000 --- a/samples/RelyingPartyCustomStore/MembersOnly/Web.config +++ /dev/null @@ -1,18 +0,0 @@ -<?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/samples/RelyingPartyCustomStore/Properties/AssemblyInfo.cs b/samples/RelyingPartyCustomStore/Properties/AssemblyInfo.cs deleted file mode 100644 index 7ff8c9b..0000000 --- a/samples/RelyingPartyCustomStore/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection;
-using System.Runtime.CompilerServices;
-using 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.
-[assembly: AssemblyTitle("RelyingPartyCustomStore")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("RelyingPartyCustomStore")]
-[assembly: AssemblyCopyright("Copyright © 2008")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")]
-
-// 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 Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/samples/RelyingPartyCustomStore/RelyingPartyCustomStore.csproj b/samples/RelyingPartyCustomStore/RelyingPartyCustomStore.csproj deleted file mode 100644 index 2519ec1..0000000 --- a/samples/RelyingPartyCustomStore/RelyingPartyCustomStore.csproj +++ /dev/null @@ -1,116 +0,0 @@ -<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{DB54DC19-BA56-4C22-A8A0-C49289EA4F53}</ProjectGuid>
- <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>RelyingPartyCustomStore</RootNamespace>
- <AssemblyName>RelyingPartyCustomStore</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Drawing" />
- <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" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="Default.aspx" />
- <Content Include="login.aspx" />
- <Content Include="MembersOnly\Default.aspx" />
- <Content Include="Web.config" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="CustomStore.cs" />
- <Compile Include="CustomStoreDataSet.Designer.cs">
- <AutoGen>True</AutoGen>
- <DesignTime>True</DesignTime>
- <DependentUpon>CustomStoreDataSet.xsd</DependentUpon>
- </Compile>
- <Compile Include="Global.asax.cs">
- <DependentUpon>Global.asax</DependentUpon>
- </Compile>
- <Compile Include="login.aspx.cs">
- <DependentUpon>login.aspx</DependentUpon>
- <SubType>ASPXCodeBehind</SubType>
- </Compile>
- <Compile Include="login.aspx.designer.cs">
- <DependentUpon>login.aspx</DependentUpon>
- </Compile>
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\src\DotNetOpenId\DotNetOpenId.csproj">
- <Project>{5D6EDC86-F5B2-4786-8376-4E7C24C63D39}</Project>
- <Name>DotNetOpenId</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Content Include="Global.asax" />
- <Content Include="MembersOnly\Web.config" />
- </ItemGroup>
- <ItemGroup>
- <None Include="CustomStoreDataSet.xsc">
- <DependentUpon>CustomStoreDataSet.xsd</DependentUpon>
- </None>
- <None Include="CustomStoreDataSet.xsd">
- <SubType>Designer</SubType>
- <Generator>MSDataSetGenerator</Generator>
- <LastGenOutput>CustomStoreDataSet.Designer.cs</LastGenOutput>
- </None>
- <None Include="CustomStoreDataSet.xss">
- <DependentUpon>CustomStoreDataSet.xsd</DependentUpon>
- </None>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.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>6945</DevelopmentServerPort>
- <DevelopmentServerVPath>/</DevelopmentServerVPath>
- <IISUrl>
- </IISUrl>
- <NTLMAuthentication>False</NTLMAuthentication>
- <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
- </WebProjectProperties>
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
-</Project>
\ No newline at end of file diff --git a/samples/RelyingPartyCustomStore/Web.config b/samples/RelyingPartyCustomStore/Web.config deleted file mode 100644 index d5574f5..0000000 --- a/samples/RelyingPartyCustomStore/Web.config +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0"?>
-<configuration>
- <system.web>
- <compilation debug="true"/>
- <customErrors mode="RemoteOnly"/>
- <authentication mode="Forms">
- <forms name="RelyingPartyCustomStoreSession"/> <!-- named cookie prevents conflicts with other samples -->
- </authentication>
- <trace enabled="false" writeToDiagnosticsTrace="true" />
- <!-- Trust level discussion:
- Full: everything works
- High: TRACE compilation symbol must NOT be defined
- Medium/Low: doesn't work on default machine.config, because WebPermission.Connect is denied.
- -->
- <trust level="Full" originUrl=""/>
- </system.web>
- <system.diagnostics>
- <switches>
- <!-- Disabled tracing because it breaks WebResource.axd, which downloads the OpenID logo. -->
- <!--<add name="OpenID" value="4"/>-->
- </switches>
- <trace autoflush="true" indentsize="4">
- <listeners>
- <add name="fileLogger" type="System.Diagnostics.TextWriterTraceListener"
- initializeData="openidConsumerTrace.txt" traceOutputOptions="None"/>
- </listeners>
- </trace>
- </system.diagnostics>
-</configuration>
diff --git a/samples/RelyingPartyCustomStore/login.aspx b/samples/RelyingPartyCustomStore/login.aspx deleted file mode 100644 index d04ec0a..0000000 --- a/samples/RelyingPartyCustomStore/login.aspx +++ /dev/null @@ -1,24 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="True" CodeBehind="login.aspx.cs" Inherits="login" ValidateRequest="false" %>
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>Login</title>
-</head>
-<body>
- <form id="Form1" runat="server">
- <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" />
- <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" />
- </form>
-</body>
-</html>
diff --git a/samples/RelyingPartyCustomStore/login.aspx.cs b/samples/RelyingPartyCustomStore/login.aspx.cs deleted file mode 100644 index f7b1088..0000000 --- a/samples/RelyingPartyCustomStore/login.aspx.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System;
-using System.Web.UI;
-using DotNetOpenId.RelyingParty;
-using System.Web.Security;
-using RelyingPartyCustomStore;
-
-public partial class login : System.Web.UI.Page {
- protected void Page_Load(object sender, EventArgs e) {
- openIdBox.Focus();
-
- OpenIdRelyingParty rp = new OpenIdRelyingParty(CustomStore.Instance, Request.Url,
- Request.HttpMethod == "GET" ? Request.QueryString : Request.Form);
- if (rp.Response != null) {
- switch (rp.Response.Status) {
- case AuthenticationStatus.Authenticated:
- FormsAuthentication.RedirectFromLoginPage(rp.Response.ClaimedIdentifier, false);
- break;
- case AuthenticationStatus.Canceled:
- loginCanceledLabel.Visible = true;
- break;
- case AuthenticationStatus.Failed:
- loginFailedLabel.Visible = true;
- break;
- }
- }
- }
-
- protected void loginButton_Click(object sender, EventArgs e) {
- OpenIdRelyingParty rp = new OpenIdRelyingParty(CustomStore.Instance, Request.Url,
- Request.HttpMethod == "GET" ? Request.QueryString : Request.Form);
- rp.CreateRequest(openIdBox.Text).RedirectToProvider();
- }
-}
diff --git a/samples/RelyingPartyCustomStore/login.aspx.designer.cs b/samples/RelyingPartyCustomStore/login.aspx.designer.cs deleted file mode 100644 index b5a6e1f..0000000 --- a/samples/RelyingPartyCustomStore/login.aspx.designer.cs +++ /dev/null @@ -1,68 +0,0 @@ -//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Runtime Version:2.0.50727.1434
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-
-
-public partial class login {
-
- /// <summary>
- /// Form1 control.
- /// </summary>
- /// <remarks>
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- /// </remarks>
- protected global::System.Web.UI.HtmlControls.HtmlForm Form1;
-
- /// <summary>
- /// Label1 control.
- /// </summary>
- /// <remarks>
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- /// </remarks>
- protected global::System.Web.UI.WebControls.Label Label1;
-
- /// <summary>
- /// openIdBox control.
- /// </summary>
- /// <remarks>
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- /// </remarks>
- protected global::System.Web.UI.WebControls.TextBox openIdBox;
-
- /// <summary>
- /// loginButton control.
- /// </summary>
- /// <remarks>
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- /// </remarks>
- protected global::System.Web.UI.WebControls.Button loginButton;
-
- /// <summary>
- /// loginFailedLabel control.
- /// </summary>
- /// <remarks>
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- /// </remarks>
- protected global::System.Web.UI.WebControls.Label loginFailedLabel;
-
- /// <summary>
- /// loginCanceledLabel control.
- /// </summary>
- /// <remarks>
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- /// </remarks>
- protected global::System.Web.UI.WebControls.Label loginCanceledLabel;
-}
|