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

User Auth: Replace ILoginService with Queries and Commands #488

Closed
HeyJoel opened this issue Feb 9, 2022 · 1 comment
Closed

User Auth: Replace ILoginService with Queries and Commands #488

HeyJoel opened this issue Feb 9, 2022 · 1 comment

Comments

@HeyJoel
Copy link
Member

HeyJoel commented Feb 9, 2022

ILoginService doesn't really do very much now, and mostly delegates to IUserSessionService, so it's a bit confusing as to which you're supposed to use, and at the time not very discoverable.

Instead it should be replaced with queries and commands for authentication, which can be exposed through IAdvancedContentRepository.

This will be a breaking change for anyone using ILoginService.

@HeyJoel HeyJoel added this to the 0.10 milestone Feb 9, 2022
HeyJoel added a commit that referenced this issue Feb 10, 2022
- Removed ILoginService (ISignInService)
- Added `IAdvancedContentRepository.Users().Authentication().AuthenticateCredentialsAsync(AuthenticateUserCredentialsQuery)`
- Added `IAdvancedContentRepository.Users().Authentication().SignInWithCredentialsAsync(SignInUserWithCredentialsCommand)`
- Added `IAdvancedContentRepository.Users().Authentication().SignInAuthenticatedUserAsync(SignInAuthenticatedUserCommand)`
- Added `IAdvancedContentRepository.Users().Authentication().SignOutAsync()`
- Added `IAdvancedContentRepository.Users().Authentication().SignOutAllUserAreasAsync()`
- Added IDomainRepository.WithContext<TUserArea>() to allow switching the user context the one associate with that user area.
@HeyJoel
Copy link
Member Author

HeyJoel commented Feb 10, 2022

Fixed, will be release in v0.10

  • Removed ILoginService (ISignInService)
  • Added IAdvancedContentRepository.Users().Authentication().AuthenticateCredentialsAsync(AuthenticateUserCredentialsQuery)
  • Added IAdvancedContentRepository.Users().Authentication().SignInWithCredentialsAsync(SignInUserWithCredentialsCommand)
  • Added IAdvancedContentRepository.Users().Authentication().SignInAuthenticatedUserAsync(SignInAuthenticatedUserCommand)
  • Added IAdvancedContentRepository.Users().Authentication().SignOutAsync()
  • Added IAdvancedContentRepository.Users().Authentication().SignOutAllUserAreasAsync()
  • Added IDomainRepository.WithContext<TUserArea>() to allow switching the user context the one associate with that user area.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant