Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PAS-434 | update secret api key wording when you download them #582

Merged
merged 1 commit into from
May 13, 2024

update secret api key wording in download

905eedc
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

PAS-434 | update secret api key wording when you download them #582

update secret api key wording in download
905eedc
Select commit
Loading
Failed to load commit list.
GitHub Actions / Test Results succeeded May 10, 2024 in 1s

297 passed, 0 failed and 0 skipped

Tests passed successfully

Report Passed Failed Skipped Time
tests/AdminConsole.Tests/TestResults/pw-test-results.trx 85✅ 10s
tests/Api.IntegrationTests/TestResults/pw-test-results.trx 103✅ 98s
tests/Api.Tests/TestResults/pw-test-results.trx 27✅ 9s
tests/Common.Tests/TestResults/pw-test-results.trx 44✅ 9s
tests/Service.Tests/TestResults/pw-test-results.trx 38✅ 9s

✅ tests/AdminConsole.Tests/TestResults/pw-test-results.trx

85 tests were completed in 10s with 85 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Passwordless.AdminConsole.Tests.Components.BadgeTests 11✅ 63ms
Passwordless.AdminConsole.Tests.Components.Pages.App.BaseApplicationTests 3✅ 2ms
Passwordless.AdminConsole.Tests.Components.Pages.App.LogTests 1✅ 85ms
Passwordless.AdminConsole.Tests.Components.Pages.App.ReportingComponents.TotalCredentialsCountChartTests 1✅ 97ms
Passwordless.AdminConsole.Tests.Components.Pages.App.ReportingComponents.TotalUsersCountChartTests 1✅ 46ms
Passwordless.AdminConsole.Tests.Components.Pages.App.Settings.AuthenticatorsTests 3✅ 863ms
Passwordless.AdminConsole.Tests.Components.Pages.App.Settings.SettingsComponents.ApiKeysSectionTests 4✅ 205ms
Passwordless.AdminConsole.Tests.Components.Shared.ApexCharts.Serialization.ApexChartJsonSerializerTests 4✅ 376ms
Passwordless.AdminConsole.Tests.Components.Shared.ApexCharts.Serialization.ColorConverterTests 2✅ 1ms
Passwordless.AdminConsole.Tests.Components.Shared.ApexCharts.Validators.ColorValidatorTests 9✅ 0ms
Passwordless.AdminConsole.Tests.Components.Shared.BreadCrumbTests 6✅ 55ms
Passwordless.AdminConsole.Tests.Components.Shared.Layouts.NavMenuTests 4✅ 172ms
Passwordless.AdminConsole.Tests.Components.Shared.LocalDateTimeTests 2✅ 62ms
Passwordless.AdminConsole.Tests.Components.Shared.Modals.SimpleAlertTests 7✅ 123ms
Passwordless.AdminConsole.Tests.Components.Shared.SecureScriptTests 4✅ 61ms
Passwordless.AdminConsole.Tests.Components.Shared.SecureStylesheetTests 4✅ 125ms
Passwordless.AdminConsole.Tests.Components.Shared.Stats.SimpleCardsStatsTests 4✅ 37ms
Passwordless.AdminConsole.Tests.Components.Shared.Stats.TrendingCardsStatsTests 4✅ 866ms
Passwordless.AdminConsole.Tests.Components.Shared.Table.PagedTableTests 4✅ 17ms
Passwordless.AdminConsole.Tests.Components.Shared.Table.TableTests 2✅ 412ms
Passwordless.AdminConsole.Tests.Components.Shared.Validation.CustomValidationErrorsTests 2✅ 823ms
Passwordless.AdminConsole.Tests.Endpoints.ApplicationEndpointsTests 3✅ 65ms

✅ Passwordless.AdminConsole.Tests.Components.BadgeTests

✅ Badge_Renders_ExpectedBackground_Variant(variant: Danger, expectedClass: "bg-red-600")
✅ Badge_Renders_ExpectedBackground_Variant(variant: Info, expectedClass: "bg-blue-600")
✅ Badge_Renders_ExpectedBackground_Variant(variant: Primary, expectedClass: "bg-blue-600")
✅ Badge_Renders_ExpectedBackground_Variant(variant: Success, expectedClass: "bg-green-600")
✅ Badge_Renders_ExpectedBackground_Variant(variant: Warning, expectedClass: "bg-yellow-600")
✅ Badge_Renders_ExpectedText
✅ Badge_Renders_WhiteText(variant: Danger)
✅ Badge_Renders_WhiteText(variant: Info)
✅ Badge_Renders_WhiteText(variant: Primary)
✅ Badge_Renders_WhiteText(variant: Success)
✅ Badge_Renders_WhiteText(variant: Warning)

✅ Passwordless.AdminConsole.Tests.Components.Pages.App.BaseApplicationTests

✅ AllApplicationPages_Inherit_BaseApplicationPage
✅ AllApplicationPages_Inherit_BaseApplicationPage_WhenPathMatches
✅ BaseApplicationPage_Has_HasAppHandler_AuthorizationPolicy

✅ Passwordless.AdminConsole.Tests.Components.Pages.App.LogTests

✅ LogPage_DoesRendersEmptyTable_WhenEventsIsEmpty

✅ Passwordless.AdminConsole.Tests.Components.Pages.App.ReportingComponents.TotalCredentialsCountChartTests

✅ RenderComponent_Renders_ExpectedId

✅ Passwordless.AdminConsole.Tests.Components.Pages.App.ReportingComponents.TotalUsersCountChartTests

✅ RenderComponent_Renders_ExpectedId

✅ Passwordless.AdminConsole.Tests.Components.Pages.App.Settings.AuthenticatorsTests

✅ AllowList_Renders_Nothing_WhenAllowListEmpty
✅ AllowList_Renders_SortedAlphabetically
✅ Authenticators_RedirectsTo_Settings_WhenAttestationIsNotAllowed

✅ Passwordless.AdminConsole.Tests.Components.Pages.App.Settings.SettingsComponents.ApiKeysSectionTests

✅ ApiKeysSection_DoesNotRender_WhenApplicationIsPendingDeletion
✅ ApiKeysSection_Renders_ExpectedIcons_WhenApiKeyIsLocked
✅ ApiKeysSection_Renders_LockIcon_WhenApiKeyIsUnlocked
✅ ApiKeysSection_Renders_WhenApplicationIsNotPendingDeletion

✅ Passwordless.AdminConsole.Tests.Components.Shared.ApexCharts.Serialization.ApexChartJsonSerializerTests

✅ Color_Is_Serialized_As_Hex
✅ Enums_Are_Serialized_As_Strings
✅ Properties_Are_Serialized_With_CamelCase
✅ Properties_With_Null_Values_Are_Not_Serialized

✅ Passwordless.AdminConsole.Tests.Components.Shared.ApexCharts.Serialization.ColorConverterTests

✅ Write_ConvertsColorToHexFormat
✅ Write_ConvertsColorWithoutAlphaToHexFormat

✅ Passwordless.AdminConsole.Tests.Components.Shared.ApexCharts.Validators.ColorValidatorTests

✅ IsValid_ReturnsFalse_WhenLengthIsTooLong
✅ IsValid_ReturnsFalse_WhenLengthIsTooShort1
✅ IsValid_ReturnsFalse_WhenLengthIsTooShort2
✅ IsValid_ReturnsTrue_WhenLengthIs3
✅ IsValid_ReturnsTrue_WhenLengthIs4
✅ IsValid_ReturnsTrue_WhenLowercaseHexIsValid
✅ IsValid_ReturnsTrue_WhenRgbaHexIsValid
✅ IsValid_ReturnsTrue_WhenRgbHexIsValid
✅ IsValid_ReturnsTrue_WhenUppercaseHexIsValid

✅ Passwordless.AdminConsole.Tests.Components.Shared.BreadCrumbTests

✅ BreadCrumb_Renders_AllMiddleItemsButAsLinks
✅ BreadCrumb_Renders_FirstElementAsLink
✅ BreadCrumb_Renders_LastItemAsText
✅ BreadCrumb_Renders_Nothing_WhenItemsIsNull
✅ BreadCrumb_Renders_Nothing_WhenNoItems
✅ BreadCrumb_Renders_Nothing_WhenOnlyOneItem

✅ Passwordless.AdminConsole.Tests.Components.Shared.Layouts.NavMenuTests

✅ NavMenu_Renders_EmptySidebar_WhenNotAuthenticated
✅ NavMenu_Renders_ExpectedApplicationLinks_ApplicationIsNotPendingDeletion
✅ NavMenu_Renders_ExpectedApplicationLinks_ApplicationIsPendingDeletion
✅ NavMenu_Renders_Sidebar_WhenAuthenticated

✅ Passwordless.AdminConsole.Tests.Components.Shared.LocalDateTimeTests

✅ LocalDateTime_Applies_Nonce_OnScriptTag
✅ LocalDateTime_Renders_ExpectedMarkup

✅ Passwordless.AdminConsole.Tests.Components.Shared.Modals.SimpleAlertTests

✅ SimpleAlert_Applies_HiddenClass_WhenIsHiddenIsTrue
✅ SimpleAlert_DoesNotApply_HiddenClass_WhenIsHiddenIsFalse
✅ SimpleAlert_Renders_Actions_WithDefaultText
✅ SimpleAlert_Renders_Actions_WithExpectedIdAttributes
✅ SimpleAlert_Renders_Description
✅ SimpleAlert_Renders_IdAttribute
✅ SimpleAlert_Renders_Title

✅ Passwordless.AdminConsole.Tests.Components.Shared.SecureScriptTests

✅ SecureScript_Renders_InlineScript
✅ SecureScript_Renders_NonceAttribute
✅ SecureScript_Renders_ScriptFile
✅ SecureScript_Renders_WithoutNonceAttribute

✅ Passwordless.AdminConsole.Tests.Components.Shared.SecureStylesheetTests

✅ SecureStylesheet_DoesNot_NonceAttributeForCssFile
✅ SecureStylesheet_Renders_LinkTag_ForFile
✅ SecureStylesheet_Renders_LinkTag_ForInlineCss
✅ SecureStylesheet_Renders_NonceAttributeForInlineCss

✅ Passwordless.AdminConsole.Tests.Components.Shared.Stats.SimpleCardsStatsTests

✅ SimpleCardsStats_Renders_3Cards
✅ SimpleCardsStats_Renders_ExpectedCardsWithExpectedClasses
✅ SimpleCardsStats_Renders_ExpectedCardsWithExpectedContent
✅ SimpleCardsStats_Renders_Nothing_WhenItemsAreEmpty

✅ Passwordless.AdminConsole.Tests.Components.Shared.Stats.TrendingCardsStatsTests

✅ TrendingCardsStats_Renders_3Cards
✅ TrendingCardsStats_Renders_ExpectedCardsWithExpectedClasses
✅ TrendingCardsStats_Renders_ExpectedCardsWithExpectedContent
✅ TrendingCardsStats_Renders_Nothing_WhenItemsAreEmpty

✅ Passwordless.AdminConsole.Tests.Components.Shared.Table.PagedTableTests

✅ Ctor_SetsExpectedAmountOfPages_WhenLastPageContainsLessItemsThanPageSize
✅ Ctor_ShouldSetCurrentIndex
✅ Ctor_ShouldSetPages
✅ Ctor_ShouldSetTotalPages

✅ Passwordless.AdminConsole.Tests.Components.Shared.Table.TableTests

✅ Table_Renders_EmptyColumnHeaders
✅ Table_Renders_ExpectedColumnHeaders

✅ Passwordless.AdminConsole.Tests.Components.Shared.Validation.CustomValidationErrorsTests

✅ CustomValidationErrors_RendersNothing_WhenNoValidationMessages
✅ CustomValidationErrors_RendersValidationMessages_WhenValidationMessagesExist

✅ Passwordless.AdminConsole.Tests.Endpoints.ApplicationEndpointsTests

✅ IsAppIdAvailableAsync_Returns_ExpectedResult_FromPasswordlessApiException
✅ IsAppIdAvailableAsync_Returns_Ok(isAvailable: False)
✅ IsAppIdAvailableAsync_Returns_Ok(isAvailable: True)

✅ tests/Api.IntegrationTests/TestResults/pw-test-results.trx

103 tests were completed in 98s with 103 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Passwordless.Api.IntegrationTests.AuthorizationTests 17✅ 12s
Passwordless.Api.IntegrationTests.Endpoints.App.AppTests 21✅ 15s
Passwordless.Api.IntegrationTests.Endpoints.Authenticators.AuthenticatorsTests 7✅ 18s
Passwordless.Api.IntegrationTests.Endpoints.Credentials.CredentialsTests 3✅ 48s
Passwordless.Api.IntegrationTests.Endpoints.Events.EventsTests 13✅ 14s
Passwordless.Api.IntegrationTests.Endpoints.Magic.MagicTests 10✅ 52s
Passwordless.Api.IntegrationTests.Endpoints.Register.RegisterAttestationTests 6✅ 11s
Passwordless.Api.IntegrationTests.Endpoints.Register.RegisterTests 3✅ 44s
Passwordless.Api.IntegrationTests.Endpoints.Register.RegisterTokenTests 10✅ 15s
Passwordless.Api.IntegrationTests.Endpoints.SignIn.SignInTests 7✅ 54s
Passwordless.Api.IntegrationTests.Middleware.AuthorizationIntegrationTests 4✅ 7s
Passwordless.Api.IntegrationTests.Middleware.RoutingIntegrationTests 2✅ 5s

✅ Passwordless.Api.IntegrationTests.AuthorizationTests

✅ ApiPublicGivesHelpfulAdviceAsync(input: "", details: "A valid 'ApiKey' header is required.")
✅ ApiPublicGivesHelpfulAdviceAsync(input: "missing", details: "A valid 'ApiKey' header is required.")
✅ ApiPublicGivesHelpfulAdviceAsync(input: "register_123", details: "A register token was supplied instead of your 'Api"···)
✅ ApiPublicGivesHelpfulAdviceAsync(input: "secret-header-instead", details: "A 'ApiSecret' header was supplied when a 'ApiKey' "···)
✅ ApiPublicGivesHelpfulAdviceAsync(input: "somethingrandom", details: "We don't recognize the value you supplied for your"···)
✅ ApiPublicGivesHelpfulAdviceAsync(input: "test:secret:123", details: "Your ApiKey header contained a ApiSecret instead o"···)
✅ ApiPublicGivesHelpfulAdviceAsync(input: "verify_123", details: "A verify token was supplied instead of your 'ApiKe"···)
✅ ApiSecretGivesHelpfulAdviceAsync(input: "", details: "A valid 'ApiSecret' header is required.")
✅ ApiSecretGivesHelpfulAdviceAsync(input: "missing", details: "A valid 'ApiSecret' header is required.")
✅ ApiSecretGivesHelpfulAdviceAsync(input: "public-header-instead", details: "A 'ApiKey' header was supplied when a 'ApiSecret' "···)
✅ ApiSecretGivesHelpfulAdviceAsync(input: "register_13", details: "A register token was supplied instead of your 'Api"···)
✅ ApiSecretGivesHelpfulAdviceAsync(input: "somethingrandom", details: "We don't recognize the value you supplied for your"···)
✅ ApiSecretGivesHelpfulAdviceAsync(input: "test:public:123", details: "Your ApiSecret header contained a public ApiKey in"···)
✅ ApiSecretGivesHelpfulAdviceAsync(input: "verify_123", details: "A verify token was supplied instead of your 'ApiSe"···)
✅ ValidateThatEndpointsHaveProtectionAsync
✅ ValidateThatInvalidApiSecretThrowsAsync
✅ ValidateThatMissingApiSecretThrowsAsync

✅ Passwordless.Api.IntegrationTests.Endpoints.App.AppTests

✅ I can check whether an app id is available
✅ I can check whether an app id is unavailable
✅ I can create a new public key
✅ I can create a new secret key
✅ I can create an account with a valid name
✅ I can create an app and its features will be set correctly
✅ I can delete an api key
✅ I can disable magic links
✅ I can disable the generate sign in token endpoint
✅ I can enable magic links
✅ I can enable the generate sign in token endpoint
✅ I can get all api keys for my application
✅ I can get an apps features
✅ I can lock an api key
✅ I can manage an apps features
✅ I can not set the event logging retention period to an invalid value(invalidRetentionPeriod: -1)
✅ I can not set the event logging retention period to an invalid value(invalidRetentionPeriod: 91)
✅ I can set event logging retention period
✅ I can unlock a locked api key
✅ I cannot create an account with an invalid name(name: "1")
✅ I cannot create an account with an invalid name(name: "a")

✅ Passwordless.Api.IntegrationTests.Endpoints.Authenticators.AuthenticatorsTests

✅ I can delist authenticators when attestation is allowed
✅ I can retrieve configured authenticators when attestation is allowed
✅ I can retrieve configured authenticators with expected result
✅ I can whitelist authenticators when attestation is allowed
✅ I receive forbidden when delisting authenticators when attestation is not allowed
✅ I receive forbidden when retrieving configured authenticators when attestation is not allowed
✅ I receive forbidden when whitelisting authenticators when attestation is not allowed

✅ Passwordless.Api.IntegrationTests.Endpoints.Credentials.CredentialsTests

✅ I am told to pass the user id when getting credential list using get with secret key
✅ I am told to pass the user id when getting credential list using post with secret key
✅ I can view a list of registered users credentials

✅ Passwordless.Api.IntegrationTests.Endpoints.Events.EventsTests

✅ I can view the event for a user creating an api key
✅ I can view the event for a user retrieving the api keys
✅ I can view the event for deleting an api key
✅ I can view the event for disabling magic links
✅ I can view the event for disabling the generate sign in token endpoint
✅ I can view the event for enabling magic links
✅ I can view the event for enabling the generate sign in token endpoint
✅ I can view the event for locking an api key
✅ I can view the event for unlocking an api key
✅ I can view the event for using a disabled api secret
✅ I can view the event for using a disabled public key
✅ I can view the event for using a non existent api key
✅ I can view the event for using a non existent api secret

✅ Passwordless.Api.IntegrationTests.Endpoints.Magic.MagicTests

✅ I can send a magic link email
✅ I can send a magic link email after enough time passed since the monthly quota was exceeded
✅ I can send a magic link email to a non admin address if the application is old enough
✅ I can send a magic link email to an admin address even if the application is too new
✅ I cannot send a magic link email if the feature is disabled
✅ I cannot send a magic link email to a non admin address if the application is too new
✅ I cannot send too many magic link emails in a month
✅ I cannot send too many magic link emails in a short time
✅ I receive a validation error when an invalid url is sent
✅ I receive a validation error when the url does not contain the token template

✅ Passwordless.Api.IntegrationTests.Endpoints.Register.RegisterAttestationTests

✅ I can use supported attestation methods to register a new user when attestation is allowed(attestation: "direct", expectedAttestation: Direct)
✅ I can use supported attestation methods to register a new user when attestation is allowed(attestation: "indirect", expectedAttestation: Indirect)
✅ I can use supported attestation methods to register a new user when attestation is allowed(attestation: "none", expectedAttestation: None)
✅ I can use supported none attestation method to register a new user when attestation is disallowed(attestation: "none", expectedAttestation: None)
✅ I cannot use other than none attestation method to register a new user when attestation is disallowed(attestation: "direct")
✅ I cannot use other than none attestation method to register a new user when attestation is disallowed(attestation: "indirect")

✅ Passwordless.Api.IntegrationTests.Endpoints.Register.RegisterTests

✅ I can retrieve the credential create options and session token for creating a new user
✅ I can retrieve token to start registration
✅ I can use a passkey to register a new user

✅ Passwordless.Api.IntegrationTests.Endpoints.Register.RegisterTokenTests

✅ InvalidUserIdReturnsError(userid: "")
✅ InvalidUserIdReturnsError(userid: null)
✅ InvalidUsernameReturnsError(input: "")
✅ InvalidUsernameReturnsError(input: null)
✅ NoneAssertionIsAccepted(attestation: "")
✅ NoneAssertionIsAccepted(attestation: "none")
✅ NoneAssertionIsAccepted(attestation: "None")
✅ OtherAssertionIsNotAccepted(attestation: "enterprise")
✅ OtherAssertionIsNotAccepted(attestation: "other")
✅ UserIdAndDisplayNameIsTheOnlyRequiredProperties

✅ Passwordless.Api.IntegrationTests.Endpoints.SignIn.SignInTests

✅ An expired apps token keys should be removed when a request is made
✅ I can retrieve assertion options to begin sign in
✅ I can retrieve my passkey after registering and receive a sign in token
✅ I can retrieve my passkey after registering and receive a valid sign in token
✅ I receive a sign in token for a valid user id
✅ I receive an api exception when using an expired token
✅ I receive an error message when sending an unrecognized passkey

✅ Passwordless.Api.IntegrationTests.Middleware.AuthorizationIntegrationTests

✅ I receive a 403 when i use a badly formatted api key with an existing endpoint
✅ I receive a 403 when i use a badly formatted api secret with an existing endpoint
✅ I receive a 403 when i use a invalid api key with an existing endpoint
✅ I receive a 403 when i use a invalid api secret with an existing endpoint

✅ Passwordless.Api.IntegrationTests.Middleware.RoutingIntegrationTests

✅ I receive a 404 when i use a badly formatted api key with a non existing endpoint
✅ I receive a 404 when i use a badly formatted api secret with a non existing endpoint

✅ tests/Api.Tests/TestResults/pw-test-results.trx

27 tests were completed in 9s with 27 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Passwordless.Api.Tests.Authorization.HeaderHandlerTests 4✅ 410ms
Passwordless.Api.Tests.Endpoints.AppsEndpointsTests 7✅ 392ms
Passwordless.Api.Tests.Endpoints.AuthenticatorsEndpointsTests 8✅ 400ms
Passwordless.Api.Tests.Endpoints.ReportingEndpointsTests 2✅ 236ms
Passwordless.Api.Tests.Extensions.HeaderDictionaryExtensionsTests 6✅ 104ms

✅ Passwordless.Api.Tests.Authorization.HeaderHandlerTests

✅ HandleAuthenticateAsync_HeaderDoesNotExist_ReturnsNoResult
✅ HandleAuthenticateAsync_HeaderIsEmpty_ReturnsNoResult
✅ HandleAuthenticateAsync_HeaderIsValid_Succeeds
✅ HandleChallengeAsync_WritesDetailError

✅ Passwordless.Api.Tests.Endpoints.AppsEndpointsTests

✅ DeleteApplicationAsync_Returns_ExpectedResult
✅ GetApplicationsPendingDeletionAsync_Returns_ExpectedResult
✅ IsAppIdAvailableAsync_Returns_Ok_WhenAppIdIsAvailable
✅ IsAppIdAvailableAsync_Returns_Ok_WhenAppIdIsUnavailable
✅ ManageFeaturesAsync_Returns_ExpectedResult
✅ MarkDeleteApplicationAsync_Returns_ExpectedResult
✅ SetFeaturesAsync_Returns_ExpectedResult

✅ Passwordless.Api.Tests.Endpoints.AuthenticatorsEndpointsTests

✅ DelistAuthenticatorsAsync_LogsAuthenticatorsDelistedEvent
✅ DelistAuthenticatorsAsync_Returns_NoContent
✅ DelistAuthenticatorsAsync_Throws_Forbidden_WhenAttestationIsNotAllowed
✅ ListConfiguredAuthenticatorsAsync_Returns_Ok_WhenAttestationIsNotAllowed
✅ ListConfiguredAuthenticatorsAsync_Throws_Forbidden_WhenAttestationIsNotAllowed
✅ WhitelistAuthenticatorsAsync_LogsAuthenticatorsWhitelistedEvent
✅ WhitelistAuthenticatorsAsync_Returns_NoContent
✅ WhitelistAuthenticatorsAsync_Throws_Forbidden_WhenAttestationIsNotAllowed

✅ Passwordless.Api.Tests.Endpoints.ReportingEndpointsTests

✅ GetPeriodicActiveUserReportsAsync_Returns_ExpectedResult
✅ GetPeriodicCredentialReportsAsync_Returns_ExpectedResult

✅ Passwordless.Api.Tests.Extensions.HeaderDictionaryExtensionsTests

✅ GetApiSecret_GivenEmptyHeaderDictionary_WhenApiSecretIsNotPresent_ThenNullShouldReturn
✅ GetApiSecret_GivenHeaderDictionary_WhenApiSecretHeaderExists_ThenTenantSecretValueShouldReturn
✅ GetApiSecret_GivenHeaderDictionary_WhenApiSecretIsNotPresent_ThenNullShouldReturn
✅ GetPublicApiKey_GivenEmptyHeaderDictionary_WhenPublicKeyIsNotPresent_ThenNullShouldReturn
✅ GetPublicApiKey_GivenHeaderDictionary_WhenPublicKeyHeaderExists_ThenTenantSecretValueShouldReturn
✅ GetPublicApiKey_GivenHeaderDictionary_WhenPublicKeyIsNotPresent_ThenNullShouldReturn

✅ tests/Common.Tests/TestResults/pw-test-results.trx

44 tests were completed in 9s with 44 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Passwordless.Common.Tests.Background.ExecutionPlanUtilityTests 4✅ 275ms
Passwordless.Common.Tests.Extensions.PublicKeyExtensionsTests 3✅ 13ms
Passwordless.Common.Tests.Extensions.SecretKeyExtensionsTests 3✅ 2ms
Passwordless.Common.Tests.Extensions.StringExtensionsTests 4✅ 6ms
Passwordless.Common.Tests.Middleware.SelfHosting.HttpOverridesMiddlewareTests 2✅ 8ms
Passwordless.Common.Tests.Serialization.HtmlSanitizerTests 7✅ 687ms
Passwordless.Common.Tests.Services.Mail.PostmarkMailProviderTests 1✅ 1s
Passwordless.Common.Tests.Utils.ApiKeyUtilsTests 9✅ 126ms
Passwordless.Common.Tests.Validation.NoForbiddenContentAttributeTests 8✅ 569ms
Passwordless.Common.Tests.Validation.RegularExpressionCollectionAttributeTests 3✅ 7ms

✅ Passwordless.Common.Tests.Background.ExecutionPlanUtilityTests

✅ GetExecutionPlan_WhenExecutionTimeIsAfterCurrentTime_ReturnsCorrectInitialDelay
✅ GetExecutionPlan_WhenExecutionTimeIsAfterCurrentTime_ReturnsCorrectInitialDelay2
✅ GetExecutionPlan_WhenExecutionTimeIsBeforeCurrentTime_ReturnsCorrectInitialDelay
✅ GetExecutionPlan_WhenExecutionTimeIsSameAsCurrentTime_ReturnsCorrectInitialDelay

✅ Passwordless.Common.Tests.Extensions.PublicKeyExtensionsTests

✅ AsPublicKeyScope_GivenDescription_ReturnsPublicKeyScope
✅ AsPublicKeyScope_GivenInvalidDescription_ThrowsArgumentException
✅ GetValue_GivenPublicKeyScope_ReturnsDescription

✅ Passwordless.Common.Tests.Extensions.SecretKeyExtensionsTests

✅ AsSecretKeyScope_GivenDescription_ReturnsSecretKeyScope
✅ AsSecretKeyScope_GivenInvalidDescription_ThrowsArgumentException
✅ GetValue_GivenSecretKeyScope_ReturnsDescription

✅ Passwordless.Common.Tests.Extensions.StringExtensionsTests

✅ GetLast_GivenStringAndAnyNumberOfCharactersToReturn_WhenStringIsEmpty_ThenShouldBeAnEmptyString
✅ GetLast_GivenStringAndAnyNumberOfCharactersToReturn_WhenStringIsNull_ThenResultShouldBeNull
✅ GetLast_GivenStringOfTwoCharacters_WhenLastThreeCharactersAreRequested_ThenShouldReturnFullString
✅ GetLast_GivenStringOfTwoCharacters_WhenLastTwoCharactersAreRequested_ThenShouldReturnFullString

✅ Passwordless.Common.Tests.Middleware.SelfHosting.HttpOverridesMiddlewareTests

✅ InvokeAsync_DoesNotModify_Scheme_WhenXForwardedProtoHeaderNotPresent
✅ InvokeAsync_Modifies_Scheme_WhenXForwardedProtoHeaderNotPresent

✅ Passwordless.Common.Tests.Serialization.HtmlSanitizerTests

✅ Sanitize_WhenGivenHtml_ShouldReturnSanitizedHtml
✅ Sanitize_WhenGivenHtmlWithAllowedTags_ShouldReturnSanitizedHtml(input: "<a href='https://example.com'>hello</a>")
✅ Sanitize_WhenGivenHtmlWithAllowedTags_ShouldReturnSanitizedHtml(input: "<a><a>hello</a></a>")
✅ Sanitize_WhenGivenHtmlWithAllowedTags_ShouldReturnSanitizedHtml(input: "<p>hello</p>")
✅ Sanitize_WhenGivenHtmlWithAllowedTags_ShouldReturnSanitizedHtml(input: "<strong>hello</strong>")
✅ Sanitize_WhenGivenStringContainingScheme_ShouldReturnSanitizedHtml(input: "http://hello")
✅ Sanitize_WhenGivenStringContainingScheme_ShouldReturnSanitizedHtml(input: "https://hello")

✅ Passwordless.Common.Tests.Services.Mail.PostmarkMailProviderTests

✅ SendAsync_GivenMessageWithMessageType_WhenCorrespondingClientDoesNotExist_ThenWarningShouldBeLogged

✅ Passwordless.Common.Tests.Utils.ApiKeyUtilsTests

✅ GetAppId_Returns_AppId_ForAValidApiKey
✅ GetAppId_Returns_AppId_ForAValidApiSecret
✅ GetAppId_Throws_ArgumentException_ForAnInvalidApiKey
✅ GetAppId_Throws_ArgumentException_ForAnInvalidApiSecret
✅ HashPrivateApiKey_Returns_ExpectedResult
✅ Validate_Returns_False_ForBadHash
✅ Validate_Returns_False_ForBadHash2
✅ Validate_Returns_False_ForInvalidApiKey
✅ Validate_Returns_True_ForValidApiKey

✅ Passwordless.Common.Tests.Validation.NoForbiddenContentAttributeTests

✅ IsValid_WhenValueContainsHtmlTags_ReturnsFalse(value: "<a>alert</a>")
✅ IsValid_WhenValueContainsHtmlTags_ReturnsFalse(value: "<div>alert</div>")
✅ IsValid_WhenValueContainsHtmlTags_ReturnsFalse(value: "<script>alert('XSS')</script>")
✅ IsValid_WhenValueContainsSchemes_ReturnsFalse(value: "http://")
✅ IsValid_WhenValueContainsSchemes_ReturnsFalse(value: "https://")
✅ IsValid_WhenValueDoesNotContainHtmlTags_ReturnsTrue
✅ IsValid_WhenValueIsNotString_ThrowsArgumentException
✅ IsValid_WhenValueIsNull_ReturnsTrue

✅ Passwordless.Common.Tests.Validation.RegularExpressionCollectionAttributeTests

✅ IsValid_Returns_False_WhenRegularExpressionDoesNotMatch
✅ IsValid_Returns_True_WhenInputIsNull
✅ IsValid_Returns_True_WhenRegularExpressionMatches

✅ tests/Service.Tests/TestResults/pw-test-results.trx

38 tests were completed in 9s with 38 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Passwordless.Service.Tests.Implementations.ApplicationServiceTests 5✅ 142ms
Passwordless.Service.Tests.Implementations.Fido2ServiceTests 3✅ 263ms
Passwordless.Service.Tests.Implementations.SharedManagementServiceTests 14✅ 206ms
Passwordless.Service.Tests.Implementations.TokenServiceTests 1✅ 165ms
Passwordless.Service.Tests.MDS.CacheHandlerTests 3✅ 244ms
Passwordless.Service.Tests.Models.ApiDescTests 2✅ 11ms
Passwordless.Service.Tests.Storage.Ef.ValueComparers.ArrayValueComparerTests 2✅ 1ms
Passwordless.Service.Tests.Storage.Ef.ValueComparers.NullableArrayValueComparerTests 3✅ 32ms
Passwordless.Service.Tests.Validation.RegisterTokenValidatorTests 5✅ 113ms

✅ Passwordless.Service.Tests.Implementations.ApplicationServiceTests

✅ AddAuthenticatorsAsync_Returns_ExpectedResult
✅ AddAuthenticatorsAsync_Throws_ApiException_WhenAuthenticatorDoesNotExist(isAllowed: False)
✅ AddAuthenticatorsAsync_Throws_ApiException_WhenAuthenticatorDoesNotExist(isAllowed: True)
✅ SetFeaturesAsync_Returns_ExpectedResult
✅ SetFeaturesAsync_Throws_ApiException_WhenPayloadIsNull

✅ Passwordless.Service.Tests.Implementations.Fido2ServiceTests

✅ CreateRegisterToken_Throws_ApiException_WhenMaxUsersExceededForNewUser
✅ CreateRegisterToken_Works_WhenMaxUsersExceededForExistingUser
✅ CreateRegisterToken_Works_WhenMaxUsersNotExceeded

✅ Passwordless.Service.Tests.Implementations.SharedManagementServiceTests

✅ DeleteApplicationAsync_Deletes_Immediately_WhenDeletedAtIsSetInThePast
✅ DeleteApplicationAsync_Throws_ApiException_WhenAppNotFound
✅ DeleteApplicationAsync_Throws_ApiException_WhenDeletedAtIsSetInTheFuture
✅ ListApiKeysAsync_Returns_ExpectedResult
✅ ListApplicationsPendingDeletionAsync_Returns_ExpectedResult
✅ MarkDeleteApplicationAsync_Deletes_Immediately_WhenLessThan3DaysOld
✅ MarkDeleteApplicationAsync_Deletes_Immediately_WhenNoUsers
✅ MarkDeleteApplicationAsync_Deletes_Scheduled_WhenMoreThan3DaysOld
✅ MarkDeleteApplicationAsync_Deletes_Scheduled_WhenUsers
✅ MarkDeleteApplicationAsync_Throws_ApiException_WhenAppNotFound
✅ SetFeaturesAsync_Returns_ExpectedResult
✅ SetFeaturesAsync_Throws_ApiException_WhenAppIdIsNull
✅ SetFeaturesAsync_Throws_ApiException_WhenPayloadIsNull
✅ SetFeaturesAsync_Throws_ApiException_WhenTenantsIsEmpty

✅ Passwordless.Service.Tests.Implementations.TokenServiceTests

✅ Test

✅ Passwordless.Service.Tests.MDS.CacheHandlerTests

✅ CacheHandler_Returns_ContentFromFile_WhenHttpRequestExceptionWasThrown
✅ CacheHandler_Returns_ContentFromFile_WhenReceivingUnsuccessfulStatusCode
✅ CacheHandler_Returns_ContentFromMDS_WhenReceivingSuccessfulStatusCode

✅ Passwordless.Service.Tests.Models.ApiDescTests

✅ MaskedApiKey_Returns_ExpectedResultForPublicKey
✅ MaskedApiKey_Returns_ExpectedResultForSecretKey

✅ Passwordless.Service.Tests.Storage.Ef.ValueComparers.ArrayValueComparerTests

✅ NullableArrayValueComparer_ComparingDifferentArrays_ReturnsExpectedResult
✅ NullableArrayValueComparer_ComparingSameArrays_ReturnsExpectedResult

✅ Passwordless.Service.Tests.Storage.Ef.ValueComparers.NullableArrayValueComparerTests

✅ NullableArrayValueComparer_ComparingDifferentArrays_ReturnsExpectedResult
✅ NullableArrayValueComparer_ComparingSameArrays_ReturnsExpectedResult
✅ NullableArrayValueComparer_Should_Compare_Nullable_Arrays

✅ Passwordless.Service.Tests.Validation.RegisterTokenValidatorTests

✅ Validate_GivenUtcNow_WhenTokenExpiredNow_ThenShouldNotThrow
✅ Validate_GivenUtcNow_WhenTokenExpiredThirtySecondsAgo_ThenApiExceptionThrowsWithMessage
✅ Validate_GivenUtcNow_WhenTokenIsNotExpired_ThenShouldNotThrow
✅ ValidateAttestation_Throws_ApiException_WhenAttestationNotAllowedForPlan
✅ ValidateAttestation_Throws_ApiException_WhenAttestationTypeIsEnterprise