Class CompleteOidcLoginCommandHandler
- Namespace
- SEBT.Portal.UseCases.Auth.CompleteOidcLogin
- Assembly
- SEBT.Portal.UseCases.dll
Orchestrates OIDC login completion. Verifies the callback token was issued for the pre-auth session and has not been used before, resolves the portal user (existing-only for step-up; get-or-create for login), and mints the portal JWT. The session is consumed on the first advance — later failures intentionally leave it unusable.
Failure log entries derive their HttpStatus from
OidcResultHttpStatus — the same table the API layer maps responses
from — so the logged status is always the returned status.
public class CompleteOidcLoginCommandHandler : ICommandHandler<CompleteOidcLoginCommand, CompleteOidcLoginResponse>
- Inheritance
-
objectCompleteOidcLoginCommandHandler
- Implements
Constructors
CompleteOidcLoginCommandHandler(IPreAuthSessionStore, IOidcExchangeService, IUserRepository, IOidcTokenService, IOidcCallbackFailureLogger, ILogger<CompleteOidcLoginCommandHandler>)
Orchestrates OIDC login completion. Verifies the callback token was issued for the pre-auth session and has not been used before, resolves the portal user (existing-only for step-up; get-or-create for login), and mints the portal JWT. The session is consumed on the first advance — later failures intentionally leave it unusable.
Failure log entries derive their HttpStatus from
OidcResultHttpStatus — the same table the API layer maps responses
from — so the logged status is always the returned status.
public CompleteOidcLoginCommandHandler(IPreAuthSessionStore sessionStore, IOidcExchangeService exchangeService, IUserRepository userRepository, IOidcTokenService oidcTokenService, IOidcCallbackFailureLogger callbackFailureLogger, ILogger<CompleteOidcLoginCommandHandler> logger)
Parameters
sessionStoreIPreAuthSessionStoreexchangeServiceIOidcExchangeServiceuserRepositoryIUserRepositoryoidcTokenServiceIOidcTokenServicecallbackFailureLoggerIOidcCallbackFailureLoggerloggerILogger<CompleteOidcLoginCommandHandler>
Methods
Handle(CompleteOidcLoginCommand, CancellationToken)
public Task<Result<CompleteOidcLoginResponse>> Handle(CompleteOidcLoginCommand command, CancellationToken cancellationToken = default)
Parameters
commandCompleteOidcLoginCommandcancellationTokenCancellationToken
Returns
- Task<Result<CompleteOidcLoginResponse>>