-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed SSO Authentication to cache SSO unique ID, for determining wh…
…ether we've seen them before, before registering or authenticating them.
- Loading branch information
1 parent
dab3dbd
commit 5640fa1
Showing
30 changed files
with
495 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -592,45 +592,6 @@ public async Task WhenUnassignPlatformRolesAsync_ThenUnassigns() | |
} | ||
#endif | ||
|
||
[Fact] | ||
public async Task WhenFindPersonByEmailAsyncAndNotExists_ThenReturnsNone() | ||
{ | ||
_userProfilesService.Setup(ups => | ||
ups.FindPersonByEmailAddressPrivateAsync(It.IsAny<ICallerContext>(), It.IsAny<string>(), | ||
It.IsAny<CancellationToken>())) | ||
.ReturnsAsync(Optional<UserProfile>.None); | ||
_invitationRepository.Setup(rep => | ||
rep.FindInvitedGuestByEmailAddressAsync(It.IsAny<EmailAddress>(), It.IsAny<CancellationToken>())) | ||
.ReturnsAsync(Optional.None<EndUserRoot>()); | ||
|
||
var result = | ||
await _application.FindPersonByEmailAddressAsync(_caller.Object, "[email protected]", | ||
CancellationToken.None); | ||
|
||
result.Should().BeSuccess(); | ||
result.Value.Should().BeNone(); | ||
} | ||
|
||
[Fact] | ||
public async Task WhenFindPersonByEmailAsyncAndExists_ThenReturns() | ||
{ | ||
var endUser = EndUserRoot.Create(_recorder.Object, _idFactory.Object, UserClassification.Person).Value; | ||
_userProfilesService.Setup(ups => | ||
ups.FindPersonByEmailAddressPrivateAsync(It.IsAny<ICallerContext>(), It.IsAny<string>(), | ||
It.IsAny<CancellationToken>())) | ||
.ReturnsAsync(Optional<UserProfile>.None); | ||
_invitationRepository.Setup(rep => | ||
rep.FindInvitedGuestByEmailAddressAsync(It.IsAny<EmailAddress>(), It.IsAny<CancellationToken>())) | ||
.ReturnsAsync(endUser.ToOptional()); | ||
|
||
var result = | ||
await _application.FindPersonByEmailAddressAsync(_caller.Object, "[email protected]", | ||
CancellationToken.None); | ||
|
||
result.Should().BeSuccess(); | ||
result.Value.Value.Id.Should().Be("anid"); | ||
} | ||
|
||
[Fact] | ||
public async Task WhenGetMembershipsAndNotRegisteredOrMemberAsync_ThenReturnsUser() | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.