diff --git a/src/api/v1/authApiService.ts b/src/api/v1/authApiService.ts index 249325a..c8054a4 100644 --- a/src/api/v1/authApiService.ts +++ b/src/api/v1/authApiService.ts @@ -5,6 +5,8 @@ import {catchError, map, Observable, of} from "rxjs"; import {AuthRoles} from "@model/authRoles"; import {AvailableOAuthProvidersResponse} from "@api/v1/availableProvidersResponse"; import {OAuthProvider} from "@model/oAuthProvider"; +import {TwoFactorAuthentication} from "@model/twoFactorAuthentication"; +import {TwoFactorAuthRequest} from "@api/v1/twoFactorAuthRequest"; export interface OAuthProviderData extends AvailableOAuthProvidersResponse { icon: string; @@ -22,7 +24,17 @@ export default class AuthApiService extends ApiService { .setWithCredentials() .build; - return this.post(request); + return this.post(request); + } + + public twoFactorAuth(data: TwoFactorAuthRequest) { + let request = this.createRequestBuilder() + .setEndpoint('2FA') + .setData(data) + .setWithCredentials() + .build; + + return this.post(request); } public reLogin() {