next try with changed logging

This commit is contained in:
Claus-Peter Huebner 2023-10-25 17:10:11 +02:00
parent 2e2b22bb7e
commit 24fafb3187
3 changed files with 13 additions and 12 deletions

View File

@ -47,6 +47,13 @@ export async function startCommunityAuthentication(
homeCom.publicKey.toString('hex'),
args.url,
)
const pubKeyBuf = Buffer.from(args.publicKey, 'hex')
logger.debug(`Authentication: url=`, args.url)
logger.debug(`Authentication: homeCom.PublicKey=`, homeCom.publicKey)
logger.debug(`Authentication: pubKeyBuf=`, pubKeyBuf)
logger.debug(`Authentication: pubKeyBufString=`, pubKeyBuf.toString('hex'))
logger.debug(`Authentication: publicKey=`, args.publicKey)
if (await client.openConnection(args)) {
logger.info(`Authentication: successful initiated at community:`, foreignFedCom.endPoint)
} else {

View File

@ -26,11 +26,7 @@ export class AuthenticationClient {
}
async openConnection(args: OpenConnectionArgs): Promise<boolean | undefined> {
logger.debug(
`Authentication: openConnection at ${this.endpoint} for args:`,
args.url,
args.publicKey,
)
logger.debug(`Authentication: openConnection at ${this.endpoint} for args:`, args)
try {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const { data } = await this.client.rawRequest(openConnection, { args })

View File

@ -19,13 +19,11 @@ export class AuthenticationResolver {
args: OpenConnectionArgs,
): Promise<boolean> {
const pubKeyBuf = Buffer.from(args.publicKey, 'hex')
logger.debug(
`Authentication: openConnection() via apiVersion=1_0 ...`,
args,
args.url,
args.publicKey,
pubKeyBuf.toString('hex'),
)
logger.debug(`Authentication: openConnection() via apiVersion=1_0:`, args)
logger.debug(`Authentication: url=`, args.url)
logger.debug(`Authentication: publicKey=`, args.publicKey)
logger.debug(`Authentication: pubKeyBuf=`, pubKeyBuf)
logger.debug(`Authentication: pubKeyBufString=`, pubKeyBuf.toString('hex'))
// first find with args.publicKey the community, which starts openConnection request
const requestedCom = await DbCommunity.findOneBy({