diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2012-02-19 21:34:30 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2012-02-19 21:34:30 -0800 |
commit | 2746ec1fabc080c0ce8b088fa342e5ba1178ba70 (patch) | |
tree | 044bdc44a437a744ec6534ef5586625dc828fc59 | |
parent | f1837d5eb51cb3ed948d72048e5827332e506a71 (diff) | |
download | DotNetOpenAuth-2746ec1fabc080c0ce8b088fa342e5ba1178ba70.zip DotNetOpenAuth-2746ec1fabc080c0ce8b088fa342e5ba1178ba70.tar.gz DotNetOpenAuth-2746ec1fabc080c0ce8b088fa342e5ba1178ba70.tar.bz2 |
Fixed build breaks.
8 files changed, 79 insertions, 7 deletions
diff --git a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Client.table.sql b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Client.table.sql index 8dc2f64..49f6c3f 100644 --- a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Client.table.sql +++ b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Client.table.sql @@ -3,6 +3,7 @@ [ClientIdentifier] VARCHAR (255) COLLATE SQL_Latin1_General_CP1_CS_AS NOT NULL, [ClientSecret] VARCHAR (255) COLLATE SQL_Latin1_General_CP1_CS_AS NULL, [Callback] VARCHAR (2048) NULL, + [ClientType] INT, [Name] NVARCHAR (50) NOT NULL ); diff --git a/projecttemplates/RelyingPartyLogic/Model.Client.cs b/projecttemplates/RelyingPartyLogic/Model.Client.cs index 42f6274..a2d895e 100644 --- a/projecttemplates/RelyingPartyLogic/Model.Client.cs +++ b/projecttemplates/RelyingPartyLogic/Model.Client.cs @@ -32,6 +32,13 @@ namespace RelyingPartyLogic { } /// <summary> + /// Gets the type of the client. + /// </summary> + ClientType IClientDescription.ClientType { + get { return (ClientType)this.ClientType; } + } + + /// <summary> /// Determines whether a callback URI included in a client's authorization request /// is among those allowed callbacks for the registered client. /// </summary> diff --git a/projecttemplates/RelyingPartyLogic/Model.Designer.cs b/projecttemplates/RelyingPartyLogic/Model.Designer.cs index fe9e43b..8dddc2d 100644 --- a/projecttemplates/RelyingPartyLogic/Model.Designer.cs +++ b/projecttemplates/RelyingPartyLogic/Model.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:4.0.30319.225 +// Runtime Version:4.0.30319.239 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -15,7 +15,7 @@ [assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("DatabaseModel", "FK_IssuedToken_User", "User", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(RelyingPartyLogic.User), "ClientAuthorization", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(RelyingPartyLogic.ClientAuthorization))] // Original file name: -// Generation date: 5/20/2011 5:13:47 PM +// Generation date: 2/19/2012 9:18:26 PM namespace RelyingPartyLogic { @@ -996,13 +996,15 @@ namespace RelyingPartyLogic /// <param name="clientId">Initial value of ClientId.</param> /// <param name="clientIdentifier">Initial value of ClientIdentifier.</param> /// <param name="name">Initial value of Name.</param> + /// <param name="clientType">Initial value of ClientType.</param> [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")] - public static Client CreateClient(int clientId, string clientIdentifier, string name) + public static Client CreateClient(int clientId, string clientIdentifier, string name, int clientType) { Client client = new Client(); client.ClientId = clientId; client.ClientIdentifier = clientIdentifier; client.Name = name; + client.ClientType = clientType; return client; } /// <summary> @@ -1141,6 +1143,33 @@ namespace RelyingPartyLogic [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")] partial void OnNameChanged(); /// <summary> + /// There are no comments for property ClientType in the schema. + /// </summary> + [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] + [global::System.Runtime.Serialization.DataMemberAttribute()] + [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")] + public int ClientType + { + get + { + return this._ClientType; + } + set + { + this.OnClientTypeChanging(value); + this.ReportPropertyChanging("ClientType"); + this._ClientType = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); + this.ReportPropertyChanged("ClientType"); + this.OnClientTypeChanged(); + } + } + [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")] + private int _ClientType; + [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")] + partial void OnClientTypeChanging(int value); + [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")] + partial void OnClientTypeChanged(); + /// <summary> /// There are no comments for ClientAuthorizations in the schema. /// </summary> [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("DatabaseModel", "FK_IssuedToken_Consumer", "ClientAuthorization")] diff --git a/projecttemplates/RelyingPartyLogic/Model.edmx b/projecttemplates/RelyingPartyLogic/Model.edmx index fa8d570..450b335 100644 --- a/projecttemplates/RelyingPartyLogic/Model.edmx +++ b/projecttemplates/RelyingPartyLogic/Model.edmx @@ -55,6 +55,7 @@ <Property Name="ClientIdentifier" Type="varchar" Nullable="false" MaxLength="255" /> <Property Name="ClientSecret" Type="varchar" MaxLength="255" /> <Property Name="Callback" Type="varchar" MaxLength="2048" /> + <Property Name="ClientType" Type="int" Nullable="false" /> <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" /> </EntityType> <EntityType Name="ClientAuthorization"> @@ -274,6 +275,7 @@ <Property Type="String" Name="CallbackAsString" MaxLength="2048" FixedLength="false" Unicode="true" /> <Property Type="String" Name="Name" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" /> <NavigationProperty Name="ClientAuthorizations" Relationship="DatabaseModel.FK_IssuedToken_Consumer" FromRole="Client" ToRole="ClientAuthorization" /> + <Property Type="Int32" Name="ClientType" Nullable="false" /> </EntityType> <EntityType Name="ClientAuthorization"> <Key> @@ -363,6 +365,7 @@ <EntitySetMapping Name="Clients"> <EntityTypeMapping TypeName="DatabaseModel.Client"> <MappingFragment StoreEntitySet="Client"> + <ScalarProperty Name="ClientType" ColumnName="ClientType" /> <ScalarProperty Name="Name" ColumnName="Name" /> <ScalarProperty Name="CallbackAsString" ColumnName="Callback" /> <ScalarProperty Name="ClientSecret" ColumnName="ClientSecret" /> @@ -441,11 +444,11 @@ <ConnectorPoint PointX="4.625" PointY="1.9324446614583337" /> <ConnectorPoint PointX="5.25" PointY="1.9324446614583337" /></AssociationConnector> <EntityTypeShape EntityType="DatabaseModel.Nonce" Width="1.5" PointX="9.625" PointY="0.75" Height="1.9802864583333326" /> - <EntityTypeShape EntityType="DatabaseModel.Client" Width="1.625" PointX="5.25" PointY="3.75" Height="2.1725878906249996" /> + <EntityTypeShape EntityType="DatabaseModel.Client" Width="1.625" PointX="5.25" PointY="3.75" Height="2.3648893229166665" /> <EntityTypeShape EntityType="DatabaseModel.ClientAuthorization" Width="1.75" PointX="2.875" PointY="3.75" Height="2.1725878906250031" /> <AssociationConnector Association="DatabaseModel.FK_IssuedToken_Consumer" > - <ConnectorPoint PointX="5.25" PointY="4.8362939453125" /> - <ConnectorPoint PointX="4.625" PointY="4.8362939453125" /> + <ConnectorPoint PointX="5.25" PointY="4.8362939453125016" /> + <ConnectorPoint PointX="4.625" PointY="4.8362939453125016" /> </AssociationConnector> <AssociationConnector Association="DatabaseModel.FK_IssuedToken_User" > <ConnectorPoint PointX="3.75" PointY="3.2494921875" /> diff --git a/samples/OAuthAuthorizationServer/Code/Client.cs b/samples/OAuthAuthorizationServer/Code/Client.cs index ce52008..d33dc3f 100644 --- a/samples/OAuthAuthorizationServer/Code/Client.cs +++ b/samples/OAuthAuthorizationServer/Code/Client.cs @@ -29,6 +29,13 @@ } /// <summary> + /// Gets the type of the client. + /// </summary> + ClientType IClientDescription.ClientType { + get { return (ClientType)this.ClientType; } + } + + /// <summary> /// Determines whether a callback URI included in a client's authorization request /// is among those allowed callbacks for the registered client. /// </summary> diff --git a/samples/OAuthAuthorizationServer/Code/DataClasses.dbml b/samples/OAuthAuthorizationServer/Code/DataClasses.dbml index 5536b6e..fe621c2 100644 --- a/samples/OAuthAuthorizationServer/Code/DataClasses.dbml +++ b/samples/OAuthAuthorizationServer/Code/DataClasses.dbml @@ -15,6 +15,7 @@ <Column Name="ClientSecret" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" /> <Column Name="Callback" Type="System.String" CanBeNull="true" /> <Column Name="Name" Type="System.String" CanBeNull="false" /> + <Column Member="ClientType" Type="System.Int32" CanBeNull="false" /> <Association Name="Client_ClientAuthorization" Member="ClientAuthorizations" Storage="_OAuthTokens" ThisKey="ClientId" OtherKey="ClientId" Type="ClientAuthorization" /> </Type> </Table> diff --git a/samples/OAuthAuthorizationServer/Code/DataClasses.designer.cs b/samples/OAuthAuthorizationServer/Code/DataClasses.designer.cs index 5035753..a1e4b83 100644 --- a/samples/OAuthAuthorizationServer/Code/DataClasses.designer.cs +++ b/samples/OAuthAuthorizationServer/Code/DataClasses.designer.cs @@ -272,6 +272,8 @@ namespace OAuthAuthorizationServer.Code private string _Name; + private int _ClientType; + private EntitySet<ClientAuthorization> _OAuthTokens; #region Extensibility Method Definitions @@ -288,6 +290,8 @@ namespace OAuthAuthorizationServer.Code partial void OnCallbackChanged(); partial void OnNameChanging(string value); partial void OnNameChanged(); + partial void OnClientTypeChanging(int value); + partial void OnClientTypeChanged(); #endregion public Client() @@ -396,6 +400,26 @@ namespace OAuthAuthorizationServer.Code } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ClientType")] + public int ClientType + { + get + { + return this._ClientType; + } + set + { + if ((this._ClientType != value)) + { + this.OnClientTypeChanging(value); + this.SendPropertyChanging(); + this._ClientType = value; + this.SendPropertyChanged("ClientType"); + this.OnClientTypeChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Client_ClientAuthorization", Storage="_OAuthTokens", ThisKey="ClientId", OtherKey="ClientId")] public EntitySet<ClientAuthorization> ClientAuthorizations { diff --git a/samples/OAuthConsumerWpf/Authorize2.xaml.cs b/samples/OAuthConsumerWpf/Authorize2.xaml.cs index 2201d3e..5785a6e 100644 --- a/samples/OAuthConsumerWpf/Authorize2.xaml.cs +++ b/samples/OAuthConsumerWpf/Authorize2.xaml.cs @@ -31,7 +31,7 @@ get { return this.clientAuthorizationView.Authorization; } } - private void clientAuthorizationView_Completed(object sender, ClientAuthorizationView.ClientAuthorizationCompleteEventArgs e) { + private void clientAuthorizationView_Completed(object sender, ClientAuthorizationCompleteEventArgs e) { this.DialogResult = e.Authorization != null; this.Close(); } |