Download the PHP package labrodev/laravel-domain-verifier without Composer

On this page you can find all versions of the php package labrodev/laravel-domain-verifier. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-domain-verifier

Laravel Domain Verifier

DNS-over-HTTPS TXT/CNAME resolver for Laravel with token-based domain-ownership verification. Generate a token, tell the user which TXT record to publish, and check for it later — every lookup goes over plain HTTPS to a configurable list of DoH resolvers, so it works reliably inside Docker and is trivial to fake in tests.

Installation

Publish the config file:

Set the environment variables (all optional — the defaults are sensible):

Verifying domain ownership

Generate a token when the user registers their domain, and store it alongside the domain. VerificationTokenGenerator is a single-purpose service — invoke it directly rather than calling a named method:

Show the user the exact record to publish. expectedRecord() is the single source of truth for the record value — it prepends the configured txt_prefix:

Later — from a button, a scheduled job, whatever fits — check whether the record is live. Invoking the verifier returns a bare boolean:

Use verify() when you want to show the user why verification failed:

The match is strict and whole-string: a token embedded inside a longer record does not verify, and every mismatch is logged as a warning with the expected and observed values.

Verifying a CNAME points at your host

CnameVerifier checks that a hostname CNAMEs to a target you pass explicitly — for instance before routing a custom domain or issuing a certificate. Trailing dots are normalised on both sides:

Raw DNS lookups

DnsResolver is also useful on its own — for instance to check that a CNAME points at your platform before issuing a certificate:

Why DNS-over-HTTPS

PHP's dns_get_record() is unreliable inside Docker: the embedded resolver at 127.0.0.11 frequently returns false for TXT lookups. DoH is plain outbound HTTPS, so it works from inside containers and can be faked with Http::fake() in tests. The configured resolvers are tried in order; the system resolver is only consulted when every one of them is unreachable.

Testing

License

MIT. See LICENSE.md.


All versions of laravel-domain-verifier with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
guzzlehttp/guzzle Version ^7.8
illuminate/http Version ^13.0
illuminate/support Version ^13.0
spatie/laravel-package-tools Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package labrodev/laravel-domain-verifier contains the following files

Loading the files please wait ...