mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
next try
This commit is contained in:
parent
575cd29540
commit
b082ac1b0d
@ -53,6 +53,8 @@ export async function validateCommunities(): Promise<void> {
|
||||
// eslint-disable-next-line camelcase
|
||||
if (client instanceof V1_0_FederationClient) {
|
||||
const pubKey = await client.getPublicKey()
|
||||
logger.debug('Federation: nach getPublicKey()=', pubKey)
|
||||
logger.debug('Federation: dbCom.publicKey=', dbCom.publicKey.toString())
|
||||
if (pubKey && pubKey === dbCom.publicKey.toString()) {
|
||||
await DbFederatedCommunity.update({ id: dbCom.id }, { verifiedAt: new Date() })
|
||||
logger.info(`Federation: verified community with:`, dbCom.endPoint)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Field, InputType } from 'type-graphql'
|
||||
import { ArgsType, Field } from 'type-graphql'
|
||||
|
||||
@InputType()
|
||||
@ArgsType()
|
||||
export class OpenConnectionArgs {
|
||||
@Field(() => String)
|
||||
publicKey: string
|
||||
|
||||
@ -9,19 +9,13 @@ import { AuthenticationClientFactory } from '@/client/AuthenticationClientFactor
|
||||
// eslint-disable-next-line camelcase
|
||||
import { AuthenticationClient as V1_0_AuthenticationClient } from '@/client/1_0/AuthenticationClient'
|
||||
import { AuthenticationArgs } from '../model/AuthenticationArgs'
|
||||
import { stringToHex } from '@/util/utilities'
|
||||
|
||||
export async function startOpenConnectionCallback(
|
||||
args: OpenConnectionArgs,
|
||||
requestedCom: DbCommunity,
|
||||
api: string,
|
||||
): Promise<void> {
|
||||
logger.debug(
|
||||
`Authentication: startOpenConnectionCallback() with:`,
|
||||
args.url,
|
||||
stringToHex(args.publicKey),
|
||||
requestedCom,
|
||||
)
|
||||
logger.debug(`Authentication: startOpenConnectionCallback() with:`, args, requestedCom)
|
||||
try {
|
||||
const homeCom = await DbCommunity.findOneByOrFail({ foreign: false })
|
||||
const homeFedCom = await DbFedCommunity.findOneByOrFail({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user