Skip to content
This repository was archived by the owner on Mar 20, 2019. It is now read-only.

Commit c94c7f8

Browse files
committed
Split the OAuthServiceProvider sample into two samples: OAuthAuthorizationServer and OAuthResourceServer.
Renamed OAuthConsumer to OAuthClient.
1 parent 7d38eef commit c94c7f8

127 files changed

Lines changed: 27824 additions & 873 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

samples/OAuthServiceProvider/Code/Client.cs renamed to samples/OAuthAuthorizationServer/Code/Client.cs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
1-
//-----------------------------------------------------------------------
2-
// <copyright file="Client.cs" company="Andrew Arnott">
3-
// Copyright (c) Andrew Arnott. All rights reserved.
4-
// </copyright>
5-
//-----------------------------------------------------------------------
6-
7-
namespace OAuthServiceProvider.Code {
1+
namespace OAuthAuthorizationServer.Code {
82
using System;
93
using System.Collections.Generic;
10-
using System.Linq;
11-
using System.Web;
4+
125
using DotNetOpenAuth.OAuth2;
136

7+
/// <summary>
8+
/// An OAuth 2.0 Client that has registered with this Authorization Server.
9+
/// </summary>
1410
public partial class Client : IConsumerDescription {
1511
#region IConsumerDescription Members
1612

samples/OAuthServiceProvider/Code/DataClasses.dbml renamed to samples/OAuthAuthorizationServer/Code/DataClasses.dbml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,13 @@
1-
<?xml version="1.0" encoding="utf-8"?><Database Name="Database" EntityNamespace="OAuthServiceProvider.Code" Class="DataClassesDataContext" xmlns="http://schemas.microsoft.com/linqtosql/dbml/2007">
2-
<Connection Mode="WebSettings" ConnectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database4.mdf;Integrated Security=True;User Instance=True" SettingsObjectName="System.Configuration.ConfigurationManager.ConnectionStrings" SettingsPropertyName="DatabaseConnectionString" Provider="System.Data.SqlClient" />
1+
<?xml version="1.0" encoding="utf-8"?><Database Name="Database" EntityNamespace="OAuthAuthorizationServer.Code" Class="DataClassesDataContext" xmlns="http://schemas.microsoft.com/linqtosql/dbml/2007">
2+
<Connection Mode="WebSettings" ConnectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True" SettingsObjectName="System.Configuration.ConfigurationManager.ConnectionStrings" SettingsPropertyName="DatabaseConnectionString" Provider="System.Data.SqlClient" />
33
<Table Name="dbo.[User]" Member="Users">
44
<Type Name="User">
55
<Column Name="UserId" Type="System.Int32" DbType="Int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
66
<Column Name="OpenIDClaimedIdentifier" Type="System.String" DbType="NVarChar(150) NOT NULL" CanBeNull="false" />
77
<Column Name="OpenIDFriendlyIdentifier" Type="System.String" DbType="NVarChar(150)" CanBeNull="true" />
8-
<Column Name="FullName" Type="System.String" DbType="NVarChar(150)" CanBeNull="false" />
9-
<Column Name="Age" Type="System.Int32" DbType="int" CanBeNull="true" />
10-
<Association Name="User_FavoriteSite" Member="FavoriteSites" ThisKey="UserId" OtherKey="UserId" Type="FavoriteSite" />
118
<Association Name="User_ClientAuthorization" Member="ClientAuthorizations" Storage="_OAuthTokens" ThisKey="UserId" OtherKey="UserId" Type="ClientAuthorization" />
129
</Type>
1310
</Table>
14-
<Table Name="dbo.FavoriteSite" Member="FavoriteSites">
15-
<Type Name="FavoriteSite">
16-
<Column Name="FavoriteSiteId" Type="System.Int32" DbType="Int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
17-
<Column Name="UserId" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
18-
<Column Name="SiteUrl" Type="System.String" DbType="NVarChar(255) NOT NULL" CanBeNull="false" />
19-
<Association Name="User_FavoriteSite" Member="User" ThisKey="UserId" OtherKey="UserId" Type="User" IsForeignKey="true" DeleteRule="CASCADE" DeleteOnNull="true" />
20-
</Type>
21-
</Table>
2211
<Table Name="dbo.Client" Member="Clients">
2312
<Type Name="Client">
2413
<Column Name="ClientId" Type="System.Int32" DbType="Int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />

samples/OAuthServiceProvider/Code/DataClasses.dbml.layout renamed to samples/OAuthAuthorizationServer/Code/DataClasses.dbml.layout

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,10 @@
22
<ordesignerObjectsDiagram dslVersion="1.0.0.0" absoluteBounds="0, 0, 11, 8.5" name="DataClasses">
33
<DataContextMoniker Name="/DataClassesDataContext" />
44
<nestedChildShapes>
5-
<classShape Id="696d2c69-040e-411d-9257-bb664b743834" absoluteBounds="0.5, 0.5, 2.125, 1.7708968098958331">
5+
<classShape Id="696d2c69-040e-411d-9257-bb664b743834" absoluteBounds="0.5, 0.5, 2.125, 1.3862939453125">
66
<DataClassMoniker Name="/DataClassesDataContext/User" />
77
<nestedChildShapes>
8-
<elementListCompartment Id="cd90aeff-476c-44a9-897f-a986e4a8305b" absoluteBounds="0.515, 0.96, 2.0949999999999998, 1.2108968098958333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
9-
</nestedChildShapes>
10-
</classShape>
11-
<classShape Id="8a79b099-7f87-4766-907a-db2c3e1b5716" absoluteBounds="3.5, 0.625, 2, 1.3862939453125005">
12-
<DataClassMoniker Name="/DataClassesDataContext/FavoriteSite" />
13-
<nestedChildShapes>
14-
<elementListCompartment Id="eba736b9-f9ec-484b-8083-c77155a49e4e" absoluteBounds="3.515, 1.085, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
8+
<elementListCompartment Id="cd90aeff-476c-44a9-897f-a986e4a8305b" absoluteBounds="0.515, 0.96, 2.0949999999999998, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
159
</nestedChildShapes>
1610
</classShape>
1711
<classShape Id="f909becb-85b1-4fe6-bb16-3feb3e4fe3ee" absoluteBounds="0.5, 3.5, 2, 1.7708968098958327">
@@ -26,13 +20,6 @@
2620
<elementListCompartment Id="403126d0-3d2a-4af4-b0b8-c489a830bbd4" absoluteBounds="3.515, 3.585, 1.9700000000000002, 1.4031982421875" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
2721
</nestedChildShapes>
2822
</classShape>
29-
<associationConnector edgePoints="[(2.625 : 1.31814697265625); (3.5 : 1.31814697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed">
30-
<AssociationMoniker Name="/DataClassesDataContext/User/User_FavoriteSite" />
31-
<nodes>
32-
<classShapeMoniker Id="696d2c69-040e-411d-9257-bb664b743834" />
33-
<classShapeMoniker Id="8a79b099-7f87-4766-907a-db2c3e1b5716" />
34-
</nodes>
35-
</associationConnector>
3623
<classShape Id="a63562a7-acf2-4ed9-9686-52a1ad85633e" absoluteBounds="1.375, 6.375, 2, 1.3862939453124996">
3724
<DataClassMoniker Name="/DataClassesDataContext/Nonce" />
3825
<nestedChildShapes>
@@ -46,7 +33,7 @@
4633
<classShapeMoniker Id="895ebbc8-8352-4c04-9e53-b8e6c8302d36" />
4734
</nodes>
4835
</associationConnector>
49-
<associationConnector edgePoints="[(2.59375 : 2.27089680989583); (2.59375 : 3.28125); (3.5 : 3.28125)]" fixedFrom="NotFixed" fixedTo="NotFixed">
36+
<associationConnector edgePoints="[(2.59375 : 1.8862939453125); (2.59375 : 3.28125); (3.5 : 3.28125)]" fixedFrom="NotFixed" fixedTo="NotFixed">
5037
<AssociationMoniker Name="/DataClassesDataContext/User/User_ClientAuthorization" />
5138
<nodes>
5239
<classShapeMoniker Id="696d2c69-040e-411d-9257-bb664b743834" />

samples/OAuthServiceProvider/Code/DataClasses.designer.cs renamed to samples/OAuthAuthorizationServer/Code/DataClasses.designer.cs

Lines changed: 1 addition & 239 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)