Skip to content

Commit e5032c4

Browse files
Update to ASP.NET 5 RC1
Update to RC1 of ASP.NET 5.
1 parent a274435 commit e5032c4

File tree

71 files changed

+99
-99
lines changed

Some content is hidden

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

71 files changed

+99
-99
lines changed

Directory.Packages.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
<PackageVersion Include="JetBrains.Annotations" Version="2020.1.0" />
55
<PackageVersion Include="JustEat.HttpClientInterception" Version="3.0.0" />
66
<PackageVersion Include="MartinCostello.Logging.XUnit" Version="0.1.0" />
7-
<PackageVersion Include="Microsoft.AspNetCore.Authentication.Google" Version="5.0.0-preview.8.*" />
8-
<PackageVersion Include="Microsoft.AspNetCore.Authentication.Twitter" Version="5.0.0-preview.8.*" />
9-
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="5.0.0-preview.8.*" />
10-
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="5.0.0-preview.8.*" />
7+
<PackageVersion Include="Microsoft.AspNetCore.Authentication.Google" Version="5.0.0-rc.1.*" />
8+
<PackageVersion Include="Microsoft.AspNetCore.Authentication.Twitter" Version="5.0.0-rc.1.*" />
9+
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="5.0.0-rc.1.*" />
10+
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="5.0.0-rc.1.*" />
1111
<PackageVersion Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.0" />
1212
<PackageVersion Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="6.6.0" />
1313
<PackageVersion Include="Moq" Version="4.14.5" />

eng/Versions.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<MinorVersion>0</MinorVersion>
66
<PatchVersion>0</PatchVersion>
77
<VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix>
8-
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
9-
<PreReleaseVersionIteration>8</PreReleaseVersionIteration>
10-
<PreReleaseBrandingLabel>Preview $(PreReleaseVersionIteration)</PreReleaseBrandingLabel>
8+
<PreReleaseVersionLabel>rc</PreReleaseVersionLabel>
9+
<PreReleaseVersionIteration>1</PreReleaseVersionIteration>
10+
<PreReleaseBrandingLabel>RC $(PreReleaseVersionIteration)</PreReleaseBrandingLabel>
1111
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
1212
<DotNetFinalVersionKind Condition="'$(StabilizePackageVersion)' == 'true'">release</DotNetFinalVersionKind>
1313
<IncludePreReleaseLabelInPackageVersion>true</IncludePreReleaseLabelInPackageVersion>

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"tools": {
3-
"dotnet": "5.0.100-preview.8.20417.9"
3+
"dotnet": "5.0.100-rc.1.20452.10"
44
},
55

66
"msbuild-sdks": {

src/AspNet.Security.OAuth.Amazon/AmazonAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
7676
context.RunClaimActions();
7777

7878
await Options.Events.CreatingTicket(context);
79-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
79+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
8080
}
8181
}
8282
}

src/AspNet.Security.OAuth.Apple/AppleAuthenticationHandler.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
8080
[NotNull] AuthenticationProperties properties,
8181
[NotNull] OAuthTokenResponse tokens)
8282
{
83-
string idToken = tokens.Response.RootElement.GetString("id_token");
83+
string? idToken = tokens.Response.RootElement.GetString("id_token");
8484

8585
Logger.LogInformation("Creating ticket for Sign in with Apple.");
8686

@@ -118,7 +118,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
118118
context.RunClaimActions();
119119

120120
await Options.Events.CreatingTicket(context);
121-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
121+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
122122
}
123123

124124
/// <inheritdoc />
@@ -170,8 +170,8 @@ protected virtual IEnumerable<Claim> ExtractClaimsFromUser([NotNull] JsonElement
170170

171171
if (user.TryGetProperty("name", out var name))
172172
{
173-
claims.Add(new Claim(ClaimTypes.GivenName, name.GetString("firstName"), ClaimValueTypes.String, ClaimsIssuer));
174-
claims.Add(new Claim(ClaimTypes.Surname, name.GetString("lastName"), ClaimValueTypes.String, ClaimsIssuer));
173+
claims.Add(new Claim(ClaimTypes.GivenName, name.GetString("firstName") ?? string.Empty, ClaimValueTypes.String, ClaimsIssuer));
174+
claims.Add(new Claim(ClaimTypes.Surname, name.GetString("lastName") ?? string.Empty, ClaimValueTypes.String, ClaimsIssuer));
175175
}
176176

177177
if (user.TryGetProperty("email", out var email))

src/AspNet.Security.OAuth.ArcGIS/ArcGISAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
6868
context.RunClaimActions();
6969

7070
await Options.Events.CreatingTicket(context);
71-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
71+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
7272
}
7373
}
7474
}

src/AspNet.Security.OAuth.Asana/AsanaAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
5757
context.RunClaimActions(payload.RootElement.GetProperty("data"));
5858

5959
await Options.Events.CreatingTicket(context);
60-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
60+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
6161
}
6262
}
6363
}

src/AspNet.Security.OAuth.Autodesk/AutodeskAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
5757
context.RunClaimActions();
5858

5959
await Options.Events.CreatingTicket(context);
60-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
60+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
6161
}
6262
}
6363
}

src/AspNet.Security.OAuth.Automatic/AutomaticAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
5959
context.RunClaimActions();
6060

6161
await Options.Events.CreatingTicket(context);
62-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
62+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
6363
}
6464

6565
protected override string BuildChallengeUrl([NotNull] AuthenticationProperties properties, [NotNull] string redirectUri)

src/AspNet.Security.OAuth.Baidu/BaiduAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
5959
context.RunClaimActions();
6060

6161
await Options.Events.CreatingTicket(context);
62-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
62+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
6363
}
6464
}
6565
}

src/AspNet.Security.OAuth.Baidu/BaiduAuthenticationOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public BaiduAuthenticationOptions()
3131
ClaimActions.MapCustomJson(BaiduAuthenticationConstants.Claims.Portrait,
3232
user =>
3333
{
34-
string portrait = user.GetString("portrait");
34+
string? portrait = user.GetString("portrait");
3535
return string.IsNullOrWhiteSpace(portrait) ?
3636
null :
3737
$"https://tb.himg.baidu.com/sys/portrait/item/{WebUtility.UrlEncode(portrait)}";

src/AspNet.Security.OAuth.Basecamp/BasecampAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
5757
context.RunClaimActions();
5858

5959
await Options.Events.CreatingTicket(context);
60-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
60+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
6161
}
6262
}
6363
}

src/AspNet.Security.OAuth.BattleNet/BattleNetAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
5959
context.RunClaimActions();
6060

6161
await Options.Events.CreatingTicket(context);
62-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
62+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
6363
}
6464
}
6565
}

src/AspNet.Security.OAuth.Beam/BeamAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
5757
context.RunClaimActions();
5858

5959
await Options.Events.CreatingTicket(context);
60-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
60+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
6161
}
6262
}
6363
}

src/AspNet.Security.OAuth.Bitbucket/BitbucketAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
7272
}
7373

7474
await Options.Events.CreatingTicket(context);
75-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
75+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
7676
}
7777

7878
protected virtual async Task<string?> GetEmailAsync([NotNull] OAuthTokenResponse tokens)

src/AspNet.Security.OAuth.Buffer/BufferAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
5757
context.RunClaimActions();
5858

5959
await Options.Events.CreatingTicket(context);
60-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
60+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
6161
}
6262
}
6363
}

src/AspNet.Security.OAuth.CiscoSpark/CiscoSparkAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
5757
context.RunClaimActions();
5858

5959
await Options.Events.CreatingTicket(context);
60-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
60+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
6161
}
6262
}
6363
}

src/AspNet.Security.OAuth.Deezer/DeezerAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
104104
context.RunClaimActions();
105105

106106
await Options.Events.CreatingTicket(context);
107-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
107+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
108108
}
109109

110110
protected override string BuildChallengeUrl([NotNull] AuthenticationProperties properties, [NotNull] string redirectUri)

src/AspNet.Security.OAuth.DeviantArt/DeviantArtAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
5757
context.RunClaimActions();
5858

5959
await Options.Events.CreatingTicket(context);
60-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
60+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
6161
}
6262
}
6363
}

src/AspNet.Security.OAuth.Discord/DiscordAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
7474
context.RunClaimActions();
7575

7676
await Options.Events.CreatingTicket(context);
77-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
77+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
7878
}
7979
}
8080
}

src/AspNet.Security.OAuth.Dropbox/DropboxAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
5757
context.RunClaimActions();
5858

5959
await Options.Events.CreatingTicket(context);
60-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
60+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
6161
}
6262
}
6363
}

src/AspNet.Security.OAuth.EVEOnline/EVEOnlineAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
5757
context.RunClaimActions();
5858

5959
await Options.Events.CreatingTicket(context);
60-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
60+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
6161
}
6262
}
6363
}

src/AspNet.Security.OAuth.ExactOnline/ExactOnlineAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
6464
context.RunClaimActions(user);
6565

6666
await Options.Events.CreatingTicket(context);
67-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
67+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
6868
}
6969
}
7070
}

src/AspNet.Security.OAuth.Fitbit/FitbitAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
6060
context.RunClaimActions(payload.RootElement.GetProperty("user"));
6161

6262
await Options.Events.CreatingTicket(context);
63-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
63+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
6464
}
6565

6666
protected override async Task<OAuthTokenResponse> ExchangeCodeAsync([NotNull] OAuthCodeExchangeContext context)

src/AspNet.Security.OAuth.Foursquare/FoursquareAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
7373
}
7474

7575
await Options.Events.CreatingTicket(context);
76-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
76+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
7777
}
7878
}
7979
}

src/AspNet.Security.OAuth.GitHub/GitHubAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
7272
}
7373

7474
await Options.Events.CreatingTicket(context);
75-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
75+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
7676
}
7777

7878
protected virtual async Task<string?> GetEmailAsync([NotNull] OAuthTokenResponse tokens)

src/AspNet.Security.OAuth.GitLab/GitLabAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
5858
context.RunClaimActions();
5959

6060
await Options.Events.CreatingTicket(context);
61-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
61+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
6262
}
6363
}
6464
}

src/AspNet.Security.OAuth.Gitee/GiteeAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
7272
}
7373

7474
await Options.Events.CreatingTicket(context);
75-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
75+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
7676
}
7777

7878
protected async Task<string?> GetEmailAsync([NotNull] OAuthTokenResponse tokens)

src/AspNet.Security.OAuth.Gitter/GitterAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
5757
context.RunClaimActions();
5858

5959
await Options.Events.CreatingTicket(context);
60-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
60+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
6161
}
6262
}
6363
}

src/AspNet.Security.OAuth.Harvest/HarvestAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
5757
context.RunClaimActions();
5858

5959
await Options.Events.CreatingTicket(context);
60-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
60+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
6161
}
6262
}
6363
}

src/AspNet.Security.OAuth.HealthGraph/HealthGraphAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
5757
context.RunClaimActions();
5858

5959
await Options.Events.CreatingTicket(context);
60-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
60+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
6161
}
6262
}
6363
}

src/AspNet.Security.OAuth.Imgur/ImgurAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
5757
context.RunClaimActions(payload.RootElement.GetProperty("data"));
5858

5959
await Options.Events.CreatingTicket(context);
60-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
60+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
6161
}
6262
}
6363
}

src/AspNet.Security.OAuth.Instagram/InstagramAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
6565
context.RunClaimActions();
6666

6767
await Options.Events.CreatingTicket(context);
68-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
68+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
6969
}
7070
}
7171
}

src/AspNet.Security.OAuth.LinkedIn/LinkedInAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
8181
}
8282

8383
await Options.Events.CreatingTicket(context);
84-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
84+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
8585
}
8686

8787
protected virtual async Task<string?> GetEmailAsync([NotNull] OAuthTokenResponse tokens)

src/AspNet.Security.OAuth.LinkedIn/LinkedInAuthenticationOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ private static IEnumerable<string> GetPictureUrls(JsonElement user)
140140
continue;
141141
}
142142

143-
string pictureUrl = imageIdentifier
143+
string? pictureUrl = imageIdentifier
144144
.EnumerateArray()
145145
.FirstOrDefault()
146146
.GetString("identifier");

src/AspNet.Security.OAuth.MailChimp/MailChimpAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
5757
context.RunClaimActions();
5858

5959
await Options.Events.CreatingTicket(context);
60-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
60+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
6161
}
6262
}
6363
}

src/AspNet.Security.OAuth.MailRu/MailRuAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
5959
context.RunClaimActions();
6060

6161
await Options.Events.CreatingTicket(context);
62-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
62+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
6363
}
6464
}
6565
}

src/AspNet.Security.OAuth.Myob/MyobAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
4040
context.RunClaimActions();
4141

4242
await Options.Events.CreatingTicket(context);
43-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
43+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
4444
}
4545
}
4646
}

src/AspNet.Security.OAuth.NetEase/NetEaseAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
5757
context.RunClaimActions();
5858

5959
await Options.Events.CreatingTicket(context);
60-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
60+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
6161
}
6262
}
6363
}

src/AspNet.Security.OAuth.Nextcloud/NextcloudAuthenticationHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
3535
[NotNull] AuthenticationProperties properties,
3636
[NotNull] OAuthTokenResponse tokens)
3737
{
38-
string userId = tokens.Response.RootElement.GetString("user_id");
38+
string userId = tokens.Response.RootElement.GetString("user_id") ?? string.Empty;
3939
string userEndpoint = Options.UserInformationEndpoint.TrimEnd('/');
4040
userEndpoint += $"/{Uri.EscapeUriString(userId)}";
4141

@@ -62,7 +62,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
6262
context.RunClaimActions();
6363

6464
await Options.Events.CreatingTicket(context);
65-
return new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name);
65+
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
6666
}
6767
}
6868
}

0 commit comments

Comments
 (0)