ApiGuard.create constructor

ApiGuard.create(
  1. String providerKey,
  2. AuthDriver driver
)

Factory constructor for easy instantiation

Implementation

factory ApiGuard.create(String providerKey, AuthDriver driver) {
  return ApiGuard(
    config: KhademAuthConfig(),
    repository: DatabaseAuthRepository(),
    passwordVerifier: HashPasswordVerifier(),
    driver: driver,
    providerKey: providerKey,
  );
}