Download the PHP package alsbury/cognito-jwt-guard without Composer

On this page you can find all versions of the php package alsbury/cognito-jwt-guard. 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 cognito-jwt-guard

Cognito JWT Guard

Laravel authorization guard for JSON Web Tokens issued by Amazon AWS Cognito

This project is fork of benbjurstrom/cognito-jwt-guard which appears to be abandoned.

Overview

This package provides a Laravel authentication guard to validate JSON Web Tokens (JWT) issued by the configured AWS Cognitio User Pool. The guard accepts tokens passed through the Authorization header or set as a CognitoIdentityServiceProvider cookie.

Once the token has been validated against the pool’s public key the guard will look for a Laravel user with a cognito_uuid value equal to the username property contained in the token.

If a local Laravel user is found the guard will authenticate them for the duration of the request. If one is not found and Single Sign-On is enabled this package will create a new Laravel user.

Note that this package does not provide methods for exchanging a username and password for a token. As such it is intended to be used with Laravel API-driven applications where the client would either obtain the token directly from Cognito or through a dedicated application responsible for authentication.

Installation

You can install the package using composer

Next publish the migration and the config/cognito.php config file with:

Next go ahead and run your migrations. This will add the required cognito_uuid property to your users table

Add your AWS Cognito user pool's identifier and region to the .env file

You will also need to change the auth driver in your config/auth.php file

Finally, depending on how you configured your Cognito User Pool's required attributes you may also want to make adjustments to your Single Sign-On settings in the published config/cognito.php file

Configuring an sso_repository_class is optional but doing so allows you to modify the new user record before it is saved or to dispatch events. An example sso_repository_class might look like this:

Security

If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.


All versions of cognito-jwt-guard with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
ext-json Version *
illuminate/auth Version ^5.1|^6
illuminate/contracts Version ^5.1|^6
illuminate/http Version ^5.1|^6
illuminate/support Version ^5.1|^6
firebase/php-jwt Version ^5.0
guzzlehttp/guzzle Version ^6.2.1
phpseclib/phpseclib Version ^2.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 alsbury/cognito-jwt-guard contains the following files

Loading the files please wait ....