Fix bug
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
import { createPublicKey } from 'crypto';
|
||||
import config from '../../../config';
|
||||
import { ILocalUser } from '../../../models/entities/user';
|
||||
import { UserKeypair } from '../../../models/entities/user-keypair';
|
||||
@ -7,5 +6,5 @@ export default (user: ILocalUser, key: UserKeypair) => ({
|
||||
id: `${config.url}/users/${user.id}/publickey`,
|
||||
type: 'Key',
|
||||
owner: `${config.url}/users/${user.id}`,
|
||||
publicKeyPem: createPublicKey(key.keyPem)
|
||||
publicKeyPem: key.publicKey
|
||||
});
|
||||
|
@ -67,7 +67,7 @@ export default async (user: ILocalUser, url: string, object: any) => {
|
||||
|
||||
sign(req, {
|
||||
authorizationHeaderName: 'Signature',
|
||||
key: keypair.keyPem,
|
||||
key: keypair.privateKey,
|
||||
keyId: `${config.url}/users/${user.id}/publickey`,
|
||||
headers: ['date', 'host', 'digest']
|
||||
});
|
||||
|
Reference in New Issue
Block a user