Table of Contents

Class ExternalAuthenticationEndpointTests

Namespace
ProjectTemplate.Web.Tests
Assembly
ProjectTemplate.Web.Tests.dll

Provides integration tests for the baseline external authentication endpoints.

public sealed class ExternalAuthenticationEndpointTests
Inheritance
ExternalAuthenticationEndpointTests
Inherited Members

Methods

AccountAccessDenied_ReturnsForbidden()

Verifies that the access denied endpoint returns a safe forbidden response.

[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/ExternalAuthenticationEndpointTests.cs", 232)]
public Task AccountAccessDenied_ReturnsForbidden()

Returns

Task

A task that represents the asynchronous test operation.

AccountLogin_DoesNotRenderSchemesThatCannotBeChallenged()

[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/ExternalAuthenticationEndpointTests.cs", 147)]
public Task AccountLogin_DoesNotRenderSchemesThatCannotBeChallenged()

Returns

Task

AccountLogin_ExternalReturnUrl_ReturnsBadRequest()

Verifies that the login page rejects external return URLs.

[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/ExternalAuthenticationEndpointTests.cs", 213)]
public Task AccountLogin_ExternalReturnUrl_ReturnsBadRequest()

Returns

Task

A task that represents the asynchronous test operation.

AccountLogin_RendersRegisteredExternalProviders()

[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/ExternalAuthenticationEndpointTests.cs", 170)]
public Task AccountLogin_RendersRegisteredExternalProviders()

Returns

Task

AccountLogin_WithDefaultProviderConfiguration_ExplainsMissingSignInPath()

Verifies that the default login page explains that cookie authentication alone does not provide a sign-in path.

[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/ExternalAuthenticationEndpointTests.cs", 191)]
public Task AccountLogin_WithDefaultProviderConfiguration_ExplainsMissingSignInPath()

Returns

Task

A task that represents the asynchronous test operation.

AccountLogout_PostWithValidAntiforgeryToken_ClearsCookieAndRedirects()

Verifies that logout accepts a valid anti-forgery token, clears the local authentication cookie, and redirects only to the supplied local return URL.

[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/ExternalAuthenticationEndpointTests.cs", 250)]
public Task AccountLogout_PostWithValidAntiforgeryToken_ClearsCookieAndRedirects()

Returns

Task

A task that represents the asynchronous test operation.

ExternalChallenge_CookieScheme_ReturnsBadRequest()

Verifies that the local cookie scheme is not treated as an external provider challenge target.

[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/ExternalAuthenticationEndpointTests.cs", 86)]
public Task ExternalChallenge_CookieScheme_ReturnsBadRequest()

Returns

Task

A task that represents the asynchronous test operation.

ExternalChallenge_DefaultSignInScheme_ReturnsBadRequest()

[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/ExternalAuthenticationEndpointTests.cs", 121)]
public Task ExternalChallenge_DefaultSignInScheme_ReturnsBadRequest()

Returns

Task

ExternalChallenge_ExternalReturnUrl_ReturnsBadRequest()

Verifies that an external return URL is rejected to avoid open redirect behavior.

[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/ExternalAuthenticationEndpointTests.cs", 67)]
public Task ExternalChallenge_ExternalReturnUrl_ReturnsBadRequest()

Returns

Task

A task that represents the asynchronous test operation.

ExternalChallenge_ProviderNameWithDifferentCase_ReturnsBadRequest()

[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/ExternalAuthenticationEndpointTests.cs", 134)]
public Task ExternalChallenge_ProviderNameWithDifferentCase_ReturnsBadRequest()

Returns

Task

ExternalChallenge_SchemeWithoutDisplayName_ReturnsBadRequest()

Verifies that the baseline login page renders registered external providers.

[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/ExternalAuthenticationEndpointTests.cs", 103)]
public Task ExternalChallenge_SchemeWithoutDisplayName_ReturnsBadRequest()

Returns

Task

A task that represents the asynchronous test operation.

ExternalChallenge_UnknownProvider_ReturnsBadRequest()

Verifies that an unknown provider scheme is rejected safely.

[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/ExternalAuthenticationEndpointTests.cs", 50)]
public Task ExternalChallenge_UnknownProvider_ReturnsBadRequest()

Returns

Task

A task that represents the asynchronous test operation.

ExternalChallenge_ValidProviderAndLocalReturnUrl_RedirectsToReturnUrl()

Verifies that a registered external provider can be challenged with a local return URL.

[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/ExternalAuthenticationEndpointTests.cs", 31)]
public Task ExternalChallenge_ValidProviderAndLocalReturnUrl_RedirectsToReturnUrl()

Returns

Task

A task that represents the asynchronous test operation.