Download the PHP package antarctica/laravel-token-auth without Composer
On this page you can find all versions of the php package antarctica/laravel-token-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download antarctica/laravel-token-auth
More information about antarctica/laravel-token-auth
Files in antarctica/laravel-token-auth
Package laravel-token-auth
Short Description Enables use of API tokens as a form of stateless authentication within Laravel
License MIT
Informations about the package laravel-token-auth
Laravel Token Auth
Enables use of API tokens as a form of stateless authentication within Laravel.
This package is designed not to rely on any particular Token or Token Blacklist implementation, however by default the tymondesigns/jwt-auth package is used to provide a JWT based Token implementation and the antarctica/laravel-token-blacklist
package is used to provided a default Token Blacklist implementation.
It is possible to provide your own implementations for managing tokens and/or blacklisting them. See the custom implementations section for details.
Installing
Require this package in your composer.json
file:
Run composer update
.
Register the service provider in the providers
array of your app/config/app.php
file:
This package uses a Repository through which users can be retrieved. There is NO default implementation for this repository included in this package. You MUST therefore provide an implementation that implements the provided interface through this package's config file.
To publish the config file run:
Then edit the user_repository
key.
Usage
To support both standard session based and token based authentication this package provides an auth.combined
filter.
To enable this filter add the following to your app/filters.php
file:
To use the filter on a route:
Contributing
This project welcomes contributions, see CONTRIBUTING
for our general policy.
Developing
To aid development and keep your local computer clean, a VM (managed by Vagrant) is used to create an isolated environment with all necessary tools/libraries available.
Requirements
- Mac OS X
- Ansible
brew install ansible
- VMware Fusion
- Vagrant
brew cask install vmware-fusion vagrant
- Host manager and Vagrant VMware plugins
vagrant plugin install vagrant-hostmanager && vagrant plugin install vagrant-vmware-fusion
- You have a private key
id_rsa
and public keyid_rsa.pub
in~/.ssh/
- You have an entry like [1] in your
~/.ssh/config
[1] SSH config entry
Provisioning development VM
VMs are managed using Vagrant and configured by Ansible.
Committing changes
The Git flow workflow is used to manage development of this package.
Discrete changes should be made within feature branches, created from and merged back into develop (where small one-line changes may be made directly).
When ready to release a set of features/changes create a release branch from develop, update documentation as required and merge into master with a tagged, semantic version (e.g. v1.2.3
).
After releases the master branch should be merged with develop to restart the process. High impact bugs can be addressed in hotfix branches, created from and merged into master directly (and then into develop).
Issue tracking
Issues, bugs, improvements, questions, suggestions and other tasks related to this package are managed through the BAS Web & Applications Team Jira project (BASWEB).
Clean up
To remove the development VM:
The laravel-token-auth
directory can then be safely deleted as normal.
License
Copyright 2015 NERC BAS. Licensed under the MIT license, see LICENSE
for details.
All versions of laravel-token-auth with dependencies
illuminate/support Version ~4.0
antarctica/laravel-base-exceptions Version ~0.1
antarctica/laravel-base-repositories Version ~0.1
tymon/jwt-auth Version ~0.3
antarctica/laravel-token-blacklist Version ~0.1