Skip to content

Commit 68622a8

Browse files
authored
Annotate Microsoft.Authentication.WebAssembly.Msal for nullability (#40269)
1 parent 60abfaf commit 68622a8

File tree

5 files changed

+33
-34
lines changed

5 files changed

+33
-34
lines changed

src/Components/WebAssembly/Authentication.Msal/src/Microsoft.Authentication.WebAssembly.Msal.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Razor">
1+
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<Sdk Name="Yarn.MSBuild" />
44

@@ -7,7 +7,6 @@
77
<Description>Authenticate your Blazor webassembly applications with Azure Active Directory and Azure Active Directory B2C</Description>
88
<GenerateDocumentationFile>true</GenerateDocumentationFile>
99
<Trimmable>true</Trimmable>
10-
<Nullable>disable</Nullable>
1110
</PropertyGroup>
1211

1312
<ItemGroup>

src/Components/WebAssembly/Authentication.Msal/src/Models/MsalAuthenticationOptions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ public class MsalAuthenticationOptions
1111
/// <summary>
1212
/// Gets or sets the client id for the application.
1313
/// </summary>
14-
public string ClientId { get; set; }
14+
public string? ClientId { get; set; }
1515

1616
/// <summary>
1717
/// Gets or sets the authority for the Azure Active Directory or Azure Active Directory B2C instance.
1818
/// </summary>
19-
public string Authority { get; set; }
19+
public string? Authority { get; set; }
2020

2121
/// <summary>
2222
/// Gets or sets a value that indicates whether or not to validate the authority.
@@ -32,15 +32,15 @@ public class MsalAuthenticationOptions
3232
/// <remarks>
3333
/// It can be an absolute or base relative <see cref="Uri"/> and defaults to <c>authentication/login-callback.</c>
3434
/// </remarks>
35-
public string RedirectUri { get; set; }
35+
public string? RedirectUri { get; set; }
3636

3737
/// <summary>
3838
/// Gets or sets the post logout redirect uri for the application.
3939
/// </summary>
4040
/// <remarks>
4141
/// It can be an absolute or base relative <see cref="Uri"/> and defaults to <c>authentication/logout-callback.</c>
4242
/// </remarks>
43-
public string PostLogoutRedirectUri { get; set; }
43+
public string? PostLogoutRedirectUri { get; set; }
4444

4545
/// <summary>
4646
/// Gets or sets whether or not to navigate to the login request url after a successful login.

src/Components/WebAssembly/Authentication.Msal/src/Models/MsalCacheOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class MsalCacheOptions
1414
/// <remarks>
1515
/// Valid values are <c>sessionStorage</c> and <c>localStorage</c>.
1616
/// </remarks>
17-
public string CacheLocation { get; set; }
17+
public string? CacheLocation { get; set; }
1818

1919
/// <summary>
2020
/// Gets or sets whether to store the authentication state in a cookie.

src/Components/WebAssembly/Authentication.Msal/src/MsalDefaultOptionsConfiguration.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace Microsoft.Authentication.WebAssembly.Msal;
1010

11-
internal class MsalDefaultOptionsConfiguration : IPostConfigureOptions<RemoteAuthenticationOptions<MsalProviderOptions>>
11+
internal sealed class MsalDefaultOptionsConfiguration : IPostConfigureOptions<RemoteAuthenticationOptions<MsalProviderOptions>>
1212
{
1313
private readonly NavigationManager _navigationManager;
1414

@@ -41,7 +41,7 @@ public void Configure(RemoteAuthenticationOptions<MsalProviderOptions> options)
4141
options.ProviderOptions.Authentication.NavigateToLoginRequestUrl = false;
4242
}
4343

44-
public void PostConfigure(string name, RemoteAuthenticationOptions<MsalProviderOptions> options)
44+
public void PostConfigure(string? name, RemoteAuthenticationOptions<MsalProviderOptions> options)
4545
{
4646
if (string.Equals(name, Options.DefaultName, StringComparison.Ordinal))
4747
{

src/Components/WebAssembly/Authentication.Msal/src/PublicAPI.Shipped.txt

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
#nullable enable
2-
~Microsoft.Authentication.WebAssembly.Msal.Models.MsalCacheOptions.CacheLocation.get -> string
3-
~Microsoft.Authentication.WebAssembly.Msal.Models.MsalCacheOptions.CacheLocation.set -> void
4-
~Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions.AdditionalScopesToConsent.get -> System.Collections.Generic.IList<string>
5-
~Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions.AdditionalScopesToConsent.set -> void
6-
~Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions.Authentication.get -> Microsoft.Authentication.WebAssembly.Msal.MsalAuthenticationOptions
7-
~Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions.Authentication.set -> void
8-
~Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions.Cache.get -> Microsoft.Authentication.WebAssembly.Msal.Models.MsalCacheOptions
9-
~Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions.Cache.set -> void
10-
~Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions.DefaultAccessTokenScopes.get -> System.Collections.Generic.IList<string>
11-
~Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions.DefaultAccessTokenScopes.set -> void
12-
~Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions.LoginMode.get -> string
13-
~Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions.LoginMode.set -> void
14-
~Microsoft.Authentication.WebAssembly.Msal.MsalAuthenticationOptions.Authority.get -> string
15-
~Microsoft.Authentication.WebAssembly.Msal.MsalAuthenticationOptions.Authority.set -> void
16-
~Microsoft.Authentication.WebAssembly.Msal.MsalAuthenticationOptions.ClientId.get -> string
17-
~Microsoft.Authentication.WebAssembly.Msal.MsalAuthenticationOptions.ClientId.set -> void
18-
~Microsoft.Authentication.WebAssembly.Msal.MsalAuthenticationOptions.KnownAuthorities.get -> System.Collections.Generic.IList<string>
19-
~Microsoft.Authentication.WebAssembly.Msal.MsalAuthenticationOptions.KnownAuthorities.set -> void
20-
~Microsoft.Authentication.WebAssembly.Msal.MsalAuthenticationOptions.PostLogoutRedirectUri.get -> string
21-
~Microsoft.Authentication.WebAssembly.Msal.MsalAuthenticationOptions.PostLogoutRedirectUri.set -> void
22-
~Microsoft.Authentication.WebAssembly.Msal.MsalAuthenticationOptions.RedirectUri.get -> string
23-
~Microsoft.Authentication.WebAssembly.Msal.MsalAuthenticationOptions.RedirectUri.set -> void
24-
~static Microsoft.Extensions.DependencyInjection.MsalWebAssemblyServiceCollectionExtensions.AddMsalAuthentication(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action<Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationOptions<Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions>> configure) -> Microsoft.Extensions.DependencyInjection.IRemoteAuthenticationBuilder<Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationState, Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteUserAccount>
25-
~static Microsoft.Extensions.DependencyInjection.MsalWebAssemblyServiceCollectionExtensions.AddMsalAuthentication<TRemoteAuthenticationState, TAccount>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action<Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationOptions<Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions>> configure) -> Microsoft.Extensions.DependencyInjection.IRemoteAuthenticationBuilder<TRemoteAuthenticationState, TAccount>
26-
~static Microsoft.Extensions.DependencyInjection.MsalWebAssemblyServiceCollectionExtensions.AddMsalAuthentication<TRemoteAuthenticationState>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action<Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationOptions<Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions>> configure) -> Microsoft.Extensions.DependencyInjection.IRemoteAuthenticationBuilder<TRemoteAuthenticationState, Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteUserAccount>
2+
Microsoft.Authentication.WebAssembly.Msal.Models.MsalCacheOptions.CacheLocation.get -> string?
3+
Microsoft.Authentication.WebAssembly.Msal.Models.MsalCacheOptions.CacheLocation.set -> void
4+
Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions.AdditionalScopesToConsent.get -> System.Collections.Generic.IList<string!>!
5+
Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions.AdditionalScopesToConsent.set -> void
6+
Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions.Authentication.get -> Microsoft.Authentication.WebAssembly.Msal.MsalAuthenticationOptions!
7+
Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions.Authentication.set -> void
8+
Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions.Cache.get -> Microsoft.Authentication.WebAssembly.Msal.Models.MsalCacheOptions!
9+
Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions.Cache.set -> void
10+
Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions.DefaultAccessTokenScopes.get -> System.Collections.Generic.IList<string!>!
11+
Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions.DefaultAccessTokenScopes.set -> void
12+
Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions.LoginMode.get -> string!
13+
Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions.LoginMode.set -> void
14+
Microsoft.Authentication.WebAssembly.Msal.MsalAuthenticationOptions.Authority.get -> string?
15+
Microsoft.Authentication.WebAssembly.Msal.MsalAuthenticationOptions.Authority.set -> void
16+
Microsoft.Authentication.WebAssembly.Msal.MsalAuthenticationOptions.ClientId.get -> string?
17+
Microsoft.Authentication.WebAssembly.Msal.MsalAuthenticationOptions.ClientId.set -> void
18+
Microsoft.Authentication.WebAssembly.Msal.MsalAuthenticationOptions.KnownAuthorities.get -> System.Collections.Generic.IList<string!>!
19+
Microsoft.Authentication.WebAssembly.Msal.MsalAuthenticationOptions.KnownAuthorities.set -> void
20+
Microsoft.Authentication.WebAssembly.Msal.MsalAuthenticationOptions.PostLogoutRedirectUri.get -> string?
21+
Microsoft.Authentication.WebAssembly.Msal.MsalAuthenticationOptions.PostLogoutRedirectUri.set -> void
22+
Microsoft.Authentication.WebAssembly.Msal.MsalAuthenticationOptions.RedirectUri.get -> string?
23+
Microsoft.Authentication.WebAssembly.Msal.MsalAuthenticationOptions.RedirectUri.set -> void
24+
~static Microsoft.Extensions.DependencyInjection.MsalWebAssemblyServiceCollectionExtensions.AddMsalAuthentication(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action<Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationOptions<Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions!>!>! configure) -> Microsoft.Extensions.DependencyInjection.IRemoteAuthenticationBuilder<Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationState!, Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteUserAccount!>!
25+
~static Microsoft.Extensions.DependencyInjection.MsalWebAssemblyServiceCollectionExtensions.AddMsalAuthentication<TRemoteAuthenticationState, TAccount>(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action<Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationOptions<Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions!>!>! configure) -> Microsoft.Extensions.DependencyInjection.IRemoteAuthenticationBuilder<TRemoteAuthenticationState!, TAccount!>!
26+
~static Microsoft.Extensions.DependencyInjection.MsalWebAssemblyServiceCollectionExtensions.AddMsalAuthentication<TRemoteAuthenticationState>(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action<Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationOptions<Microsoft.Authentication.WebAssembly.Msal.Models.MsalProviderOptions!>!>! configure) -> Microsoft.Extensions.DependencyInjection.IRemoteAuthenticationBuilder<TRemoteAuthenticationState!, Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteUserAccount!>!
2727
Microsoft.Authentication.WebAssembly.Msal.Models.MsalCacheOptions
2828
Microsoft.Authentication.WebAssembly.Msal.Models.MsalCacheOptions.MsalCacheOptions() -> void
2929
Microsoft.Authentication.WebAssembly.Msal.Models.MsalCacheOptions.StoreAuthStateInCookie.get -> bool

0 commit comments

Comments
 (0)