Laravel version update
Laravel version update
This commit is contained in:
51
vendor/namshi/jose/README.md
vendored
51
vendor/namshi/jose/README.md
vendored
@@ -1,9 +1,9 @@
|
||||
# NAMSHI | JOSE
|
||||
|
||||
[](https://travis-ci.org/namshi/jose)
|
||||
[](http://hhvm.h4cc.de/package/namshi/jose)
|
||||
|
||||
[](https://insight.sensiolabs.com/projects/4beaf3d1-0bc6-4869-b99f-71dc951a2a05)
|
||||
[](https://travis-ci.org/namshi/jose)
|
||||
[](https://packagist.org/packages/namshi/jose)
|
||||
[](https://packagist.org/packages/namshi/jose)
|
||||
[](https://packagist.org/packages/namshi/jose)
|
||||
|
||||
This library provides a lightweight
|
||||
implementation of the JWS
|
||||
@@ -11,9 +11,9 @@ implementation of the JWS
|
||||
|
||||
## Prerequisites
|
||||
|
||||
This library needs PHP 5.4+ and the library OpenSSL.
|
||||
This library needs PHP 5.5+ and the library OpenSSL.
|
||||
|
||||
It has been tested using `PHP5.4` to `PHP5.6` and `HHVM`.
|
||||
It has been tested using `PHP5.5` to `PHP7.0` and `HHVM`.
|
||||
|
||||
|
||||
## Installation
|
||||
@@ -22,7 +22,7 @@ You can install the library directly from
|
||||
composer / [packagist](https://packagist.org/packages/namshi/jose):
|
||||
|
||||
```
|
||||
"namshi/jose": "5.0.*"
|
||||
"namshi/jose": "7.0.*"
|
||||
```
|
||||
|
||||
## Usage
|
||||
@@ -80,7 +80,7 @@ $public_key = openssl_pkey_get_public("/path/to/public.key");
|
||||
if ($jws->isValid($public_key, 'RS256')) {
|
||||
$payload = $jws->getPayload();
|
||||
|
||||
echo sprintf("Hey, my JS app just did an action authenticated as user #%s", $payload['id']);
|
||||
echo sprintf("Hey, my JS app just did an action authenticated as user #%s", $payload['uid']);
|
||||
}
|
||||
```
|
||||
|
||||
@@ -90,11 +90,11 @@ if ($jws->isValid($public_key, 'RS256')) {
|
||||
|
||||
### PHPSECLIB For RSA Verification
|
||||
|
||||
You may find that you need to use this library in an environment where
|
||||
[PHP's wrappers for OpenSSL](http://php.net/manual/en/ref.openssl.php)
|
||||
You may find that you need to use this library in an environment where
|
||||
[PHP's wrappers for OpenSSL](http://php.net/manual/en/ref.openssl.php)
|
||||
do not work, or OpenSSL simply is not installed. This library uses
|
||||
OpenSSL to encrypt by default, but you can specify that you want to use [PHPSecLib](http://phpseclib.sourceforge.net/) for a pure PHP
|
||||
implementation of RSA encryption.
|
||||
OpenSSL to encrypt by default, but you can specify that you want to use [PHPSecLib](http://phpseclib.sourceforge.net/) for a pure PHP
|
||||
implementation of RSA encryption.
|
||||
|
||||
In these cases, simply add the optional `'SecLib'` parameter when
|
||||
constructing a JWS:
|
||||
@@ -104,7 +104,7 @@ $jws = new JWS(array('alg' => 'RS256'), 'SecLib');
|
||||
```
|
||||
|
||||
You can now use the PHPSecLib implementation of RSA signing. If you use
|
||||
a password protected private key, you can still submit the private key
|
||||
a password protected private key, you can still submit the private key
|
||||
to use for signing as a string, as long as you pass the password as the
|
||||
second parameter into the `sign` method:
|
||||
|
||||
@@ -172,6 +172,31 @@ Introduced the ability to specify an encryption engine. Added support of PHPSecL
|
||||
|
||||
Added the ability to set custom properties in the header. Moved automatic inclusion of certain claims into an SimpleJWS class from the base JWS class.
|
||||
|
||||
### 6.x.x - Not Backwards Compatible
|
||||
|
||||
#### 6.1.x
|
||||
- Dropped support for PHP 5.4
|
||||
- phpseclib 2.0
|
||||
|
||||
#### 6.0.x
|
||||
- Dropped support for PHP 5.3
|
||||
- Don't escape slashes when generating signin input.
|
||||
This may render tokens generated with earlier versions of Jose incompatible.
|
||||
|
||||
### 7.x.x
|
||||
|
||||
#### 7.0.x
|
||||
|
||||
Moved phpseclib and the openssl extension as suggested dependencies.
|
||||
|
||||
## Tests
|
||||
|
||||
Tests are written using PHPUnit for this library. After doing composer install you can execute the following command to run tests:
|
||||
|
||||
```
|
||||
./vendor/bin/phpunit
|
||||
```
|
||||
|
||||
## Credits
|
||||
|
||||
This library has been inspired by the
|
||||
|
||||
Reference in New Issue
Block a user