Skip to content

Commit 5a0a8ee

Browse files
committed
Merge branch 'v4.3'
Conflicts: samples/OAuthClient/Default.aspx samples/OAuthClient/Facebook.aspx.cs samples/OAuthClient/Web.config samples/OAuthClient/WindowsLive.aspx.cs samples/OAuthClient/packages.config src/DotNetOpenAuth.Core/Messaging/OutgoingWebResponse.cs src/DotNetOpenAuth.Core/Messaging/StandardWebRequestHandler.cs src/DotNetOpenAuth.OAuth.Consumer/OAuth/ConsumerBase.cs src/DotNetOpenAuth.OAuth.Consumer/OAuth/OAuth1HmacSha1HttpMessageHandler.cs src/DotNetOpenAuth.OAuth.Consumer/OAuth/OAuth1HttpMessageHandlerBase.cs src/DotNetOpenAuth.OAuth.Consumer/OAuth/OAuth1PlainTextMessageHandler.cs src/DotNetOpenAuth.OAuth.Consumer/OAuth/OAuth1RsaSha1HttpMessageHandler.cs src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs src/packages/repositories.config src/version.txt
2 parents e4c7468 + 064220d commit 5a0a8ee

49 files changed

Lines changed: 17402 additions & 260 deletions

Some content is hidden

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

nuget/DotNetOpenAuth.Ultimate.nuspec

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
<summary>OpenID, OAuth, &amp; InfoCard library for web and desktop applications.</summary>
1414
<description>
1515
A single assembly that adds OpenID 1.1/2.0, OAuth 1.0(a)/2.0, &amp; InfoCard authentication and authorization functionality for client and server applications.
16-
This allows your (web) application to issue identities or accept issued identites from other web applications, and even access your users'
17-
data on other services.
16+
This allows your (web) application to issue identities or accept issued identites from other web applications, and even access your users' data on other services.
1817
</description>
1918
<language>en-US</language>
2019
</metadata>

nuget/DotNetOpenAuth.nuspec

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
<summary>OpenID, OAuth, &amp; InfoCard library for web and desktop applications.</summary>
1414
<description>
1515
Add OpenID 1.1/2.0, OAuth 1.0(a), &amp; InfoCard authentication and authorization functionality for client and server applications.
16-
This allows your (web) application to issue identities or accept issued identites from other web applications, and even access your users'
17-
data on other services.
16+
This allows your (web) application to issue identities or accept issued identites from other web applications, and even access your users' data on other services.
1817
</description>
1918
<language>en-US</language>
2019
<dependencies>
@@ -24,6 +23,10 @@
2423
<dependency id="DotNetOpenAuth.OAuth.ServiceProvider" version="[$version$]" />
2524
<dependency id="DotNetOpenAuth.OpenIdInfoCard.UI" version="[$version$]" />
2625
<dependency id="DotNetOpenAuth.OpenIdOAuth" version="[$version$]" />
26+
27+
<dependency id="DotNetOpenAuth.OAuth2.Client.UI" version="[$version$]" />
28+
<dependency id="DotNetOpenAuth.OAuth2.AuthorizationServer" version="[$version$]" />
29+
<dependency id="DotNetOpenAuth.OAuth2.ResourceServer" version="[$version$]" />
2730
</dependencies>
2831
</metadata>
2932
<files>
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
//-----------------------------------------------------------------------
2+
// <copyright file="AzureADClaims.cs" company="Microsoft">
3+
// Copyright (c) Microsoft. All rights reserved.
4+
// </copyright>
5+
//-----------------------------------------------------------------------
6+
7+
namespace DotNetOpenAuth.ApplicationBlock
8+
{
9+
using System;
10+
using System.ComponentModel;
11+
using System.Diagnostics.CodeAnalysis;
12+
using System.Runtime.Serialization;
13+
14+
/// <summary>
15+
/// Contains clains of a AzureAD token.
16+
/// </summary>
17+
/// <remarks>
18+
/// Technically, this class doesn't need to be public, but because we want to make it serializable in medium trust, it has to be public.
19+
/// </remarks>
20+
[DataContract]
21+
[EditorBrowsable(EditorBrowsableState.Never)]
22+
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "AzureAD", Justification = "Brand name")]
23+
public class AzureADClaims
24+
{
25+
#region Public Properties
26+
27+
/// <summary>
28+
/// Gets or sets the audience.
29+
/// </summary>
30+
/// <value> The audience token is valid for. </value>
31+
[DataMember(Name = "aud")]
32+
public string Aud { get; set; }
33+
34+
/// <summary>
35+
/// Gets or sets the issuer.
36+
/// </summary>
37+
/// <value> The issuer. </value>
38+
[DataMember(Name = "iss")]
39+
public string Iss { get; set; }
40+
41+
/// <summary>
42+
/// Gets or sets the early expiry time.
43+
/// </summary>
44+
/// <value> The early expiry time. </value>
45+
[DataMember(Name = "nbf")]
46+
public string Nbf { get; set; }
47+
48+
/// <summary>
49+
/// Gets or sets the expiry time.
50+
/// </summary>
51+
/// <value> The expiry time. </value>
52+
[DataMember(Name = "exp")]
53+
public string Exp { get; set; }
54+
55+
/// <summary>
56+
/// Gets or sets the id of the user.
57+
/// </summary>
58+
/// <value> The id of the user. </value>
59+
[DataMember(Name = "oid")]
60+
public string Oid { get; set; }
61+
62+
/// <summary>
63+
/// Gets or sets the id of the tenant.
64+
/// </summary>
65+
/// <value> The tenant . </value>
66+
[DataMember(Name = "tid")]
67+
public string Tid { get; set; }
68+
69+
/// <summary>
70+
/// Gets or sets the appid of application.
71+
/// </summary>
72+
/// <value> The id of the application. </value>
73+
[DataMember(Name = "appid")]
74+
public string Appid { get; set; }
75+
#endregion
76+
}
77+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
//-----------------------------------------------------------------------
2+
// <copyright file="AzureADGraph.cs" company="Microsoft">
3+
// Copyright (c) Microsoft. All rights reserved.
4+
// </copyright>
5+
//-----------------------------------------------------------------------
6+
7+
namespace DotNetOpenAuth.ApplicationBlock
8+
{
9+
using System;
10+
using System.ComponentModel;
11+
using System.Diagnostics.CodeAnalysis;
12+
using System.Runtime.Serialization;
13+
14+
/// <summary>
15+
/// Contains data of a AzureAD user.
16+
/// </summary>
17+
/// <remarks>
18+
/// Technically, this class doesn't need to be public, but because we want to make it serializable in medium trust, it has to be public.
19+
/// </remarks>
20+
[DataContract]
21+
[EditorBrowsable(EditorBrowsableState.Never)]
22+
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "AzureAD", Justification = "Brand name")]
23+
public class AzureADGraph {
24+
#region Public Properties
25+
26+
/// <summary>
27+
/// Gets or sets the firstname.
28+
/// </summary>
29+
/// <value> The first name. </value>
30+
[DataMember(Name = "givenName")]
31+
public string GivenName { get; set; }
32+
33+
/// <summary>
34+
/// Gets or sets the lastname.
35+
/// </summary>
36+
/// <value> The last name. </value>
37+
[DataMember(Name = "surname")]
38+
public string Surname { get; set; }
39+
40+
/// <summary>
41+
/// Gets or sets the email.
42+
/// </summary>
43+
/// <value> The email. </value>
44+
[DataMember(Name = "userPrincipalName")]
45+
public string UserPrincipalName { get; set; }
46+
47+
/// <summary>
48+
/// Gets or sets the fullname.
49+
/// </summary>
50+
/// <value> The fullname. </value>
51+
[DataMember(Name = "displayName")]
52+
public string DisplayName { get; set; }
53+
54+
/// <summary>
55+
/// Gets or sets the id.
56+
/// </summary>
57+
/// <value> The id. </value>
58+
[DataMember(Name = "objectId")]
59+
public string ObjectId { get; set; }
60+
#endregion
61+
}
62+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
//-----------------------------------------------------------------------
2+
// <copyright file="AzureADHeader.cs" company="Microsoft">
3+
// Copyright (c) Microsoft. All rights reserved.
4+
// </copyright>
5+
//-----------------------------------------------------------------------
6+
7+
namespace DotNetOpenAuth.ApplicationBlock
8+
{
9+
using System;
10+
using System.ComponentModel;
11+
using System.Diagnostics.CodeAnalysis;
12+
using System.Runtime.Serialization;
13+
14+
/// <summary>
15+
/// Contains header of AzureAD JWT token.
16+
/// </summary>
17+
/// <remarks>
18+
/// Technically, this class doesn't need to be public, but because we want to make it serializable in medium trust, it has to be public.
19+
/// </remarks>
20+
[DataContract]
21+
[EditorBrowsable(EditorBrowsableState.Never)]
22+
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "AzureAD", Justification = "Brand name")]
23+
24+
public class AzureADHeader
25+
{
26+
#region Public Properties
27+
28+
/// <summary>
29+
/// Gets or sets the type of token. Will always be JWT
30+
/// </summary>
31+
/// <value> The type of token. </value>
32+
[DataMember(Name = "typ")]
33+
public string Typ { get; set; }
34+
35+
/// <summary>
36+
/// Gets or sets the algo of the header.
37+
/// </summary>
38+
/// <value> The algo of encoding. </value>
39+
[DataMember(Name = "alg")]
40+
public string Alg { get; set; }
41+
42+
/// <summary>
43+
/// Gets or sets the thumbprint of the header.
44+
/// </summary>
45+
/// <value> The thumbprint of the cert used to encode. </value>
46+
[DataMember(Name = "x5t")]
47+
public string X5t { get; set; }
48+
49+
#endregion
50+
}
51+
}

samples/DotNetOpenAuth.ApplicationBlock/DotNetOpenAuth.ApplicationBlock.csproj

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
<Reference Include="System.Runtime.Serialization" />
8383
<Reference Include="System.ServiceModel.Web" />
8484
<Reference Include="System.Web" />
85+
<Reference Include="System.Web.Extensions" />
8586
<Reference Include="System.Xml.Linq">
8687
<RequiredTargetFramework>3.5</RequiredTargetFramework>
8788
</Reference>
@@ -92,21 +93,28 @@
9293
<Reference Include="System.Xml" />
9394
</ItemGroup>
9495
<ItemGroup>
96+
<Compile Include="AzureADClaims.cs" />
97+
<Compile Include="azureadclient.cs" />
98+
<Compile Include="AzureADGraph.cs" />
99+
<Compile Include="AzureADHeader.cs" />
95100
<Compile Include="CustomExtensions\Acme.cs" />
96101
<Compile Include="CustomExtensions\AcmeRequest.cs" />
97102
<Compile Include="CustomExtensions\AcmeResponse.cs" />
98-
<Compile Include="Facebook\FacebookClient.cs" />
99-
<Compile Include="Facebook\FacebookGraph.cs" />
103+
<Compile Include="OAuth2\Facebook\FacebookClient.cs" />
104+
<Compile Include="OAuth2\Facebook\FacebookGraph.cs" />
100105
<Compile Include="CustomExtensions\UIRequestAtRelyingPartyFactory.cs" />
101-
<Compile Include="GoogleConsumer.cs" />
102106
<Compile Include="HttpAsyncHandlerBase.cs" />
103107
<Compile Include="InMemoryClientAuthorizationTracker.cs" />
108+
<Compile Include="OAuth1\GoogleConsumer.cs" />
109+
<Compile Include="OAuth2\Google\GoogleClient.cs" />
110+
<Compile Include="OAuth2\Google\GoogleGraph.cs" />
111+
<Compile Include="OAuth2\IOAuth2Graph.cs" />
104112
<Compile Include="Properties\AssemblyInfo.cs" />
105-
<Compile Include="TwitterConsumer.cs" />
113+
<Compile Include="OAuth1\TwitterConsumer.cs" />
106114
<Compile Include="Util.cs" />
107-
<Compile Include="WindowsLiveClient.cs" />
108-
<Compile Include="WindowsLiveGraph.cs" />
109-
<Compile Include="YammerConsumer.cs" />
115+
<Compile Include="OAuth2\WindowsLive\WindowsLiveClient.cs" />
116+
<Compile Include="OAuth2\WindowsLive\WindowsLiveGraph.cs" />
117+
<Compile Include="OAuth1\YammerConsumer.cs" />
110118
<Compile Include="YubikeyRelyingParty.cs" />
111119
</ItemGroup>
112120
<ItemGroup>

samples/DotNetOpenAuth.ApplicationBlock/Facebook/FacebookClient.cs

Lines changed: 0 additions & 28 deletions
This file was deleted.

samples/DotNetOpenAuth.ApplicationBlock/Facebook/FacebookGraph.cs

Lines changed: 0 additions & 54 deletions
This file was deleted.

samples/DotNetOpenAuth.ApplicationBlock/GoogleConsumer.cs renamed to samples/DotNetOpenAuth.ApplicationBlock/OAuth1/GoogleConsumer.cs

File renamed without changes.

samples/DotNetOpenAuth.ApplicationBlock/TwitterConsumer.cs renamed to samples/DotNetOpenAuth.ApplicationBlock/OAuth1/TwitterConsumer.cs

File renamed without changes.

0 commit comments

Comments
 (0)