refactor: prefix Mi for all entities (misskey-dev#11719) (MisskeyIO#160)
cheery-pick from misskey-dev@792622aeadf3e36d50cddec3c64b2ff0105ea927
This commit is contained in:
parent
651905e08f
commit
58bbff3738
234 changed files with 2061 additions and 2061 deletions
|
@ -16,7 +16,7 @@ import type { UserSecurityKeysRepository } from '@/models/index.js';
|
|||
import type { Config } from '@/config.js';
|
||||
import { bindThis } from '@/decorators.js';
|
||||
import { MetaService } from '@/core/MetaService.js';
|
||||
import { User } from '@/models/index.js';
|
||||
import { MiUser } from '@/models/index.js';
|
||||
import { IdentifiableError } from '@/misc/identifiable-error.js';
|
||||
import type {
|
||||
AuthenticationResponseJSON,
|
||||
|
@ -54,7 +54,7 @@ export class WebAuthnService {
|
|||
}
|
||||
|
||||
@bindThis
|
||||
public async initiateRegistration(userId: User['id'], userName: string, userDisplayName?: string): Promise<PublicKeyCredentialCreationOptionsJSON> {
|
||||
public async initiateRegistration(userId: MiUser['id'], userName: string, userDisplayName?: string): Promise<PublicKeyCredentialCreationOptionsJSON> {
|
||||
const relyingParty = await this.getRelyingParty();
|
||||
const keys = await this.userSecurityKeysRepository.findBy({
|
||||
userId: userId,
|
||||
|
@ -84,7 +84,7 @@ export class WebAuthnService {
|
|||
}
|
||||
|
||||
@bindThis
|
||||
public async verifyRegistration(userId: User['id'], response: RegistrationResponseJSON): Promise<{
|
||||
public async verifyRegistration(userId: MiUser['id'], response: RegistrationResponseJSON): Promise<{
|
||||
credentialID: Uint8Array;
|
||||
credentialPublicKey: Uint8Array;
|
||||
attestationObject: Uint8Array;
|
||||
|
@ -141,7 +141,7 @@ export class WebAuthnService {
|
|||
}
|
||||
|
||||
@bindThis
|
||||
public async initiateAuthentication(userId: User['id']): Promise<PublicKeyCredentialRequestOptionsJSON> {
|
||||
public async initiateAuthentication(userId: MiUser['id']): Promise<PublicKeyCredentialRequestOptionsJSON> {
|
||||
const keys = await this.userSecurityKeysRepository.findBy({
|
||||
userId: userId,
|
||||
});
|
||||
|
@ -165,7 +165,7 @@ export class WebAuthnService {
|
|||
}
|
||||
|
||||
@bindThis
|
||||
public async verifyAuthentication(userId: User['id'], response: AuthenticationResponseJSON): Promise<boolean> {
|
||||
public async verifyAuthentication(userId: MiUser['id'], response: AuthenticationResponseJSON): Promise<boolean> {
|
||||
const challenge = await this.redisClient.get(`webauthn:challenge:${userId}`);
|
||||
|
||||
if (!challenge) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue