Download the PHP package siberfx/authentication-logger without Composer

On this page you can find all versions of the php package siberfx/authentication-logger. 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 authentication-logger

Authentication Logger is a package which tracks your user's authentication information such as login/logout time, IP, Browser, Location, etc. as well as sends out notifications via mail, slack, or sms for new devices and failed logins.

Installation

You can install the package via composer:

If you want the location features you must also install torann/geoip:

You can publish and run the migrations with:

You can publish the view/email files with:

You can publish the config file with:

This is the contents of the published config file:

If you installed torann/geoip you should also publish that config file to set your defaults:

Configuration

You must add the AuthenticationLoggable and Notifiable traits to the models you want to track.

The package will listen for Laravel's Login, Logout, Failed, and OtherDeviceLogout events.

Usage

Get all authentication logs for the user:

Get the user's last login information:

Get the user's previous login time & IP address (ignoring the current login):

Notifications

Notifications may be sent on the mail, nexmo, and slack channels but by default notify via email.

You may define a notifyAuthenticationLogVia method on your authenticatable models to determine which channels the notification should be delivered on:

You must install the Slack and Nexmo drivers to use those routes and follow their documentation on setting it up for your specific authenticatable models.

New Device Notifications

Enabled by default, they use the \Siberfx\AuthenticationLogger\Notifications\NewDevice class which can be overridden in the config file.

Failed Login Notifications

Disabled by default, they use the \Siberfx\AuthenticationLogger\Notifications\FailedLogin class which can be overridden in the config file.

Location

If the torann/geoip package is installed, it will attempt to include location information to the notifications by default.

You can turn this off within the configuration for each template.

Note: By default when working locally, no location will be recorded because it will send back the default address from the geoip config file. You can override this behavior in the email templates.

Purging Old Logs

Records that are older than the number of days specified in the purge option in your config/authentication-log.php will be deleted.

You can also schedule the command at with Prunnable which shipped with Laravel 8.50 version:

Displaying The Log

Note: This example uses the jenssegers/agent package which is included by default with Laravel Jetstream as well as jamesmills/laravel-timezone for displaying timezones in the users local timezone. Both are optional, modify the table to fit your needs.


All versions of authentication-logger with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2
illuminate/contracts Version ^10.0
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 siberfx/authentication-logger contains the following files

Loading the files please wait ....