wip
This commit is contained in:
14
packages/identity/application/use-cases/StartAuthUseCase.ts
Normal file
14
packages/identity/application/use-cases/StartAuthUseCase.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import type { StartAuthCommandDTO } from '../dto/StartAuthCommandDTO';
|
||||
import type { IdentityProviderPort } from '../ports/IdentityProviderPort';
|
||||
|
||||
export class StartAuthUseCase {
|
||||
private readonly provider: IdentityProviderPort;
|
||||
|
||||
constructor(provider: IdentityProviderPort) {
|
||||
this.provider = provider;
|
||||
}
|
||||
|
||||
async execute(command: StartAuthCommandDTO): Promise<{ redirectUrl: string; state: string }> {
|
||||
return this.provider.startAuth(command);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user