mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-26 22:01:32 +01:00
setup web-login.service.ts
This commit is contained in:
parent
2b90cbb3e5
commit
d4213fba2e
@ -1,3 +1,4 @@
|
|||||||
|
export * from "./login";
|
||||||
export * from "./webauthn-login";
|
export * from "./webauthn-login";
|
||||||
export * from "./set-password-jit";
|
export * from "./set-password-jit";
|
||||||
export * from "./registration";
|
export * from "./registration";
|
||||||
|
1
apps/web/src/app/auth/core/services/login/index.ts
Normal file
1
apps/web/src/app/auth/core/services/login/index.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
export * from "./web-login.service";
|
@ -0,0 +1,3 @@
|
|||||||
|
import { DefaultLoginService, LoginService } from "@bitwarden/auth/angular";
|
||||||
|
|
||||||
|
export class WebLoginService extends DefaultLoginService implements LoginService {}
|
@ -20,6 +20,7 @@ import { ModalService as ModalServiceAbstraction } from "@bitwarden/angular/serv
|
|||||||
import {
|
import {
|
||||||
SetPasswordJitService,
|
SetPasswordJitService,
|
||||||
RegistrationFinishService as RegistrationFinishServiceAbstraction,
|
RegistrationFinishService as RegistrationFinishServiceAbstraction,
|
||||||
|
LoginService,
|
||||||
} from "@bitwarden/auth/angular";
|
} from "@bitwarden/auth/angular";
|
||||||
import { InternalUserDecryptionOptionsServiceAbstraction } from "@bitwarden/auth/common";
|
import { InternalUserDecryptionOptionsServiceAbstraction } from "@bitwarden/auth/common";
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
@ -57,7 +58,7 @@ import {
|
|||||||
import { VaultTimeout, VaultTimeoutStringType } from "@bitwarden/common/types/vault-timeout.type";
|
import { VaultTimeout, VaultTimeoutStringType } from "@bitwarden/common/types/vault-timeout.type";
|
||||||
|
|
||||||
import { PolicyListService } from "../admin-console/core/policy-list.service";
|
import { PolicyListService } from "../admin-console/core/policy-list.service";
|
||||||
import { WebSetPasswordJitService, WebRegistrationFinishService } from "../auth";
|
import { WebSetPasswordJitService, WebRegistrationFinishService, WebLoginService } from "../auth";
|
||||||
import { AcceptOrganizationInviteService } from "../auth/organization-invite/accept-organization.service";
|
import { AcceptOrganizationInviteService } from "../auth/organization-invite/accept-organization.service";
|
||||||
import { HtmlStorageService } from "../core/html-storage.service";
|
import { HtmlStorageService } from "../core/html-storage.service";
|
||||||
import { I18nService } from "../core/i18n.service";
|
import { I18nService } from "../core/i18n.service";
|
||||||
@ -200,6 +201,11 @@ const safeProviders: SafeProvider[] = [
|
|||||||
InternalUserDecryptionOptionsServiceAbstraction,
|
InternalUserDecryptionOptionsServiceAbstraction,
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
|
safeProvider({
|
||||||
|
provide: LoginService,
|
||||||
|
useClass: WebLoginService,
|
||||||
|
deps: [],
|
||||||
|
}),
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -8,6 +8,8 @@ import {
|
|||||||
DefaultRegistrationFinishService,
|
DefaultRegistrationFinishService,
|
||||||
AnonLayoutWrapperDataService,
|
AnonLayoutWrapperDataService,
|
||||||
DefaultAnonLayoutWrapperDataService,
|
DefaultAnonLayoutWrapperDataService,
|
||||||
|
LoginService,
|
||||||
|
DefaultLoginService,
|
||||||
} from "@bitwarden/auth/angular";
|
} from "@bitwarden/auth/angular";
|
||||||
import {
|
import {
|
||||||
AuthRequestServiceAbstraction,
|
AuthRequestServiceAbstraction,
|
||||||
@ -1290,6 +1292,11 @@ const safeProviders: SafeProvider[] = [
|
|||||||
useClass: DefaultRegistrationFinishService,
|
useClass: DefaultRegistrationFinishService,
|
||||||
deps: [CryptoServiceAbstraction, AccountApiServiceAbstraction],
|
deps: [CryptoServiceAbstraction, AccountApiServiceAbstraction],
|
||||||
}),
|
}),
|
||||||
|
safeProvider({
|
||||||
|
provide: LoginService,
|
||||||
|
useClass: DefaultLoginService,
|
||||||
|
deps: [],
|
||||||
|
}),
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -20,6 +20,8 @@ export * from "./input-password/password-input-result";
|
|||||||
|
|
||||||
// login
|
// login
|
||||||
export * from "./login/login.component";
|
export * from "./login/login.component";
|
||||||
|
export * from "./login/login.service";
|
||||||
|
export * from "./login/default-login.service";
|
||||||
|
|
||||||
// password callout
|
// password callout
|
||||||
export * from "./password-callout/password-callout.component";
|
export * from "./password-callout/password-callout.component";
|
||||||
|
3
libs/auth/src/angular/login/default-login.service.ts
Normal file
3
libs/auth/src/angular/login/default-login.service.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
import { LoginService } from "./login.service";
|
||||||
|
|
||||||
|
export class DefaultLoginService implements LoginService {}
|
@ -13,6 +13,8 @@ import {
|
|||||||
FormFieldModule,
|
FormFieldModule,
|
||||||
} from "@bitwarden/components";
|
} from "@bitwarden/components";
|
||||||
|
|
||||||
|
import { LoginService } from "./login.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
standalone: true,
|
standalone: true,
|
||||||
templateUrl: "./login.component.html",
|
templateUrl: "./login.component.html",
|
||||||
@ -39,6 +41,7 @@ export class LoginComponentV2 implements OnInit {
|
|||||||
private activatedRoute: ActivatedRoute,
|
private activatedRoute: ActivatedRoute,
|
||||||
private formBuilder: FormBuilder,
|
private formBuilder: FormBuilder,
|
||||||
private loginEmailService: LoginEmailServiceAbstraction,
|
private loginEmailService: LoginEmailServiceAbstraction,
|
||||||
|
private loginService: LoginService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async ngOnInit(): Promise<void> {
|
async ngOnInit(): Promise<void> {
|
||||||
|
1
libs/auth/src/angular/login/login.service.ts
Normal file
1
libs/auth/src/angular/login/login.service.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
export abstract class LoginService {}
|
Loading…
Reference in New Issue
Block a user