Webauthn Framework
v3.3
v3.3
  • Introduction
  • Web Browser Support
  • Installation
  • Contributing
  • Webauthn In A Nutshell
    • Authenticators
    • Ceremonies
  • Pre-requisites
    • The Relying Party
    • Credential Source Repository
    • User Entity
    • Javascript
    • Easy or Hard Way?
  • The Webauthn Server
    • The Easy Way
      • Register Authenticators
      • Authenticate Your Users
    • The Hard Way
      • Register Authenticators
      • Authenticate Your Users
    • The Symfony Way
      • Entities with Doctrine
      • Firewall
  • Deep into the framework
    • Register Additional Authenticators
    • Debugging
    • User Verification
    • Attestation and Metadata Statement
    • Authenticator Selection Criteria
    • Authentication without username
    • Extensions
    • Token Binding
    • Authenticator Counter
    • Dealing with “localhost”
  • Migration
    • From v2.x to v3.0
Powered by GitBook
On this page
  • The Easy Way
  • The Hard Way
  • The Symfony Way

Was this helpful?

Edit on GitHub
Export as PDF
  1. Deep into the framework

Debugging

PreviousRegister Additional AuthenticatorsNextUser Verification

Last updated 3 years ago

Was this helpful?

If you have troubles during the development of your application or if you want to keep track of every critical/error messages in production, you can use a .

The Easy Way

<?php

use App\Service\MyPsr3Logger;
use Webauthn\Server;

$server = new Server(
    $rpEntity,
    $publicKeyCredentialSourceRepository
);

// Set your logging service here
$server->setLogger(new MyPsr3Logger());

The Hard Way

Prior to version 3.3, the following classes have an optional constructor parameter $logger that can accept the logging service. From version 3.3 onwards you should use their setLogger function instead.

  • Webauthn\AttestationStatement\AttestationObjectLoader

  • Webauthn\AuthenticatorAssertionResponseValidator

  • Webauthn\AuthenticatorAttestationResponseValidator

  • Webauthn\PublicKeyCredentialLoader

  • Webauthn\Counter\ThrowExceptionIfInvalid

The Symfony Way

config/packages/webauthn.yaml
webauthn:
    logger: App\Service\MyPsr3Logger
PSR-3 compatible logger