mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-07 07:16:54 +00:00
feat(console): u2f (#1080)
* fix user table count * grpc ge * move grpc * u2f * add u2f funcs * rm local grpc, u2f dialog * dialog u2f * 2fa button * mfa u2f credentialoptions * decode base64 to bytearray, id, challenge * u2f verify * spinner, remove, attribute col * delete mfa * add forcemfa to policy * add id to remove * fix: add missing remove u2f in management * user mgmt u2f delete, login policy * rm log * show attr in mgmt user mfa * add missing id of mfa * mfa table * multifaktor for admin, org * add secondfactor to gen component * remove circular dependency * lint * revert identity prov * add divider * login policy lint * Update console/src/app/modules/policies/login-policy/login-policy.component.html * Update console/src/app/modules/policies/login-policy/login-policy.component.html Co-authored-by: Maximilian Peintner <csaq7175@uibk.ac.at> Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
@@ -5,34 +5,37 @@ import { BehaviorSubject, from, merge, Observable, of, Subject } from 'rxjs';
|
||||
import { catchError, filter, finalize, first, map, mergeMap, switchMap, take, timeout } from 'rxjs/operators';
|
||||
|
||||
import {
|
||||
Changes,
|
||||
ChangesRequest,
|
||||
ExternalIDPRemoveRequest,
|
||||
ExternalIDPSearchRequest,
|
||||
ExternalIDPSearchResponse,
|
||||
Gender,
|
||||
MfaOtpResponse,
|
||||
MultiFactors,
|
||||
MyPermissions,
|
||||
MyProjectOrgSearchQuery,
|
||||
MyProjectOrgSearchRequest,
|
||||
MyProjectOrgSearchResponse,
|
||||
Org,
|
||||
PasswordChange,
|
||||
PasswordComplexityPolicy,
|
||||
UpdateUserAddressRequest,
|
||||
UpdateUserEmailRequest,
|
||||
UpdateUserPhoneRequest,
|
||||
UpdateUserProfileRequest,
|
||||
UserAddress,
|
||||
UserEmail,
|
||||
UserPhone,
|
||||
UserProfile,
|
||||
UserProfileView,
|
||||
UserSessionViews,
|
||||
UserView,
|
||||
VerifyMfaOtp,
|
||||
VerifyUserPhoneRequest,
|
||||
Changes,
|
||||
ChangesRequest,
|
||||
ExternalIDPRemoveRequest,
|
||||
ExternalIDPSearchRequest,
|
||||
ExternalIDPSearchResponse,
|
||||
Gender,
|
||||
MfaOtpResponse,
|
||||
MultiFactors,
|
||||
MyPermissions,
|
||||
MyProjectOrgSearchQuery,
|
||||
MyProjectOrgSearchRequest,
|
||||
MyProjectOrgSearchResponse,
|
||||
Org,
|
||||
PasswordChange,
|
||||
PasswordComplexityPolicy,
|
||||
UpdateUserAddressRequest,
|
||||
UpdateUserEmailRequest,
|
||||
UpdateUserPhoneRequest,
|
||||
UpdateUserProfileRequest,
|
||||
UserAddress,
|
||||
UserEmail,
|
||||
UserPhone,
|
||||
UserProfile,
|
||||
UserProfileView,
|
||||
UserSessionViews,
|
||||
UserView,
|
||||
VerifyMfaOtp,
|
||||
VerifyUserPhoneRequest,
|
||||
VerifyWebAuthN,
|
||||
WebAuthNResponse,
|
||||
WebAuthNTokenID,
|
||||
} from '../proto/generated/auth_pb';
|
||||
import { GrpcService } from './grpc.service';
|
||||
import { StorageKey, StorageService } from './storage.service';
|
||||
@@ -328,9 +331,31 @@ export class GrpcAuthService {
|
||||
);
|
||||
}
|
||||
|
||||
public AddMyMfaU2F(): Promise<WebAuthNResponse> {
|
||||
return this.grpcService.auth.addMyMfaU2F(
|
||||
new Empty(),
|
||||
);
|
||||
}
|
||||
|
||||
public RemoveMyMfaU2F(id: string): Promise<Empty> {
|
||||
const req = new WebAuthNTokenID();
|
||||
req.setId(id);
|
||||
return this.grpcService.auth.removeMyMfaU2F(req);
|
||||
}
|
||||
|
||||
public VerifyMyMfaU2F(credential: string, tokenname: string): Promise<Empty> {
|
||||
const req = new VerifyWebAuthN();
|
||||
req.setPublicKeyCredential(credential);
|
||||
req.setTokenName(tokenname);
|
||||
|
||||
return this.grpcService.auth.verifyMyMfaU2F(
|
||||
req,
|
||||
);
|
||||
}
|
||||
|
||||
public RemoveMfaOTP(): Promise<Empty> {
|
||||
return this.grpcService.auth.removeMfaOTP(
|
||||
new Empty(),
|
||||
new Empty(),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user