Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix README and CHANGELOG #99

Merged
merged 1 commit into from
Mar 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 123 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,128 @@
# Change Log

## [5.1.0](https://github.com/auth0/laravel-auth0/tree/5.1.0) (2018-03-20)
[Full Changelog](https://github.com/auth0/laravel-auth0/compare/5.0.2...5.1.0)

**Closed issues**
- pls change config arg name [\#95](https://github.com/auth0/laravel-auth0/issues/95)

**Added**
- AutoDiscovery [\#91](https://github.com/auth0/laravel-auth0/pull/91) ([m1guelpf](https://github.com/m1guelpf))
- Added guzzle options to config to allow for connection options [\#88](https://github.com/auth0/laravel-auth0/pull/88) ([mjmgooch](https://github.com/mjmgooch))

**Changed**
- Change default settings file [\#96](https://github.com/auth0/laravel-auth0/pull/96) ([joshcanhelp](https://github.com/joshcanhelp))
- Utilise Auth0->Login to ensure state validation [\#90](https://github.com/auth0/laravel-auth0/pull/90) ([cocojoe](https://github.com/cocojoe))

**Fixed**
- Make code comments gender neutral [\#98](https://github.com/auth0/laravel-auth0/pull/98) ([devjack](https://github.com/devjack))
- Fix README and CHANGELOG [\#99](https://github.com/auth0/laravel-auth0/pull/99) ([joshcanhelp](https://github.com/joshcanhelp))

## [5.0.2](https://github.com/auth0/laravel-auth0/tree/5.0.2) (2017-08-30)
[Full Changelog](https://github.com/auth0/laravel-auth0/compare/5.0.1...5.0.2)

**Merged pull requests:**

- Use instead of to identify the Auth0 user [\#80](https://github.com/auth0/laravel-auth0/pull/80) ([glena](https://github.com/glena))

## [5.0.1](https://github.com/auth0/laravel-auth0/tree/5.0.1) (2017-02-23)
[Full Changelog](https://github.com/auth0/laravel-auth0/compare/5.0.0...5.0.1)

Fixed `supported_algs` configuration name

## [5.0.0](https://github.com/auth0/laravel-auth0/tree/5.0.0) (2017-02-22)
[Full Changelog](https://github.com/auth0/laravel-auth0/compare/4.0.8...5.0.0)

**Merged pull requests:**

- V5: update to auth0 sdk v5 [\#69](https://github.com/auth0/laravel-auth0/pull/69) ([glena](https://github.com/glena))

## [4.0.8](https://github.com/auth0/laravel-auth0/tree/4.0.8) (2017-01-27)
[Full Changelog](https://github.com/auth0/laravel-auth0/compare/4.0.7...4.0.8)

**Closed issues**

- Allow use of RS256 Protocol [\#63](https://github.com/auth0/wp-auth0/issues/63)
- Add RS256 to the list of supported algorithms [\#62](https://github.com/auth0/wp-auth0/issues/62)

**Merged pull requests:**

- allow to configure the algorithm supported for token verification [\#65](https://github.com/auth0/laravel-auth0/pull/65) ([glena](https://github.com/glena))

## [4.0.7](https://github.com/auth0/laravel-auth0/tree/4.0.7) (2017-01-02)
[Full Changelog](https://github.com/auth0/laravel-auth0/compare/4.0.6...4.0.7)

**Merged pull requests:**

- it should pass all the configs to the oauth client [\#64](https://github.com/auth0/laravel-auth0/pull/64) ([glena](https://github.com/glena))

## [4.0.6](https://github.com/auth0/laravel-auth0/tree/4.0.6) (2016-11-29)
[Full Changelog](https://github.com/auth0/laravel-auth0/compare/4.0.5...4.0.6)

**Merged pull requests:**

- Code style & docblocks [\#56](https://github.com/auth0/laravel-auth0/pull/56) ([seanmangar](https://github.com/seanmangar))
- Adding accessor to retrieve JWT from Auth0Service [\#58](https://github.com/auth0/laravel-auth0/pull/58) ([ryantology](https://github.com/ryantology))

## [4.0.5](https://github.com/auth0/laravel-auth0/tree/4.0.5) (2016-11-29)
[Full Changelog](https://github.com/auth0/laravel-auth0/compare/4.0.4...4.0.5)

**Merged pull requests:**

- Added flag for not encoded tokens + removed example [\#57](https://github.com/auth0/laravel-auth0/pull/57) ([glena](https://github.com/glena))

## [4.0.4](https://github.com/auth0/laravel-auth0/tree/4.0.4) (2016-11-25)
[Full Changelog](https://github.com/auth0/laravel-auth0/compare/4.0.2...4.0.4)

**Merged pull requests:**

- Fixing config type [\#55](https://github.com/auth0/laravel-auth0/pull/55) ([adamgoose](https://github.com/adamgoose))

## [4.0.2](https://github.com/auth0/laravel-auth0/tree/4.0.2) (2016-10-03)
[Full Changelog](https://github.com/auth0/laravel-auth0/compare/4.0.1...4.0.2)

**Merged pull requests:**

- Fixing JWTVerifier [\#54](https://github.com/auth0/laravel-auth0/pull/54) ([adamgoose](https://github.com/adamgoose))

## [4.0.1](https://github.com/auth0/laravel-auth0/tree/4.0.1) (2016-09-19)
[Full Changelog](https://github.com/auth0/laravel-auth0/compare/4.0.0...4.0.1)

**Merged pull requests:**

- fix error becuase of contract and class with the same name [\#52](https://github.com/auth0/laravel-auth0/pull/52) ([glena](https://github.com/glena))

## [4.0.0](https://github.com/auth0/laravel-auth0/tree/4.0.0) (2016-09-15)
[Full Changelog](https://github.com/auth0/laravel-auth0/compare/3.2.1...4.0.0)

Better support for Laravel 5.3: Support for Laravel Passport for token verification
Support of auth0 PHP sdk v4 with JWKs cache

**Merged pull requests:**

- Merge pull request #50 from auth0/4.x.x-dev [\#50](https://github.com/auth0/laravel-auth0/pull/50) ([glena](https://github.com/glena))

## [3.2.1](https://github.com/auth0/laravel-auth0/tree/3.2.1) (2016-09-12)
[Full Changelog](https://github.com/auth0/laravel-auth0/compare/3.2.0...3.2.1)

**Merged pull requests:**

- Fix for Laravel 5.2 [\#49](https://github.com/auth0/laravel-auth0/pull/49) ([dscafati](https://github.com/dscafati))

## [3.2.0](https://github.com/auth0/laravel-auth0/tree/3.2.0) (2016-07-11)
[Full Changelog](https://github.com/auth0/laravel-auth0/compare/3.1.0...3.2.0)

**Merged pull requests:**

- New optional jwt middleware [\#40](https://github.com/auth0/laravel-auth0/pull/40) ([glena](https://github.com/glena))

## [3.1.0](https://github.com/auth0/laravel-auth0/tree/3.1.0) (2016-05-02)
[Full Changelog](https://github.com/auth0/laravel-auth0/compare/3.0.3...3.1.0)

**Merged pull requests:**

- 3.1.0 [\#36](https://github.com/auth0/laravel-auth0/pull/36) ([glena](https://github.com/glena))

## [3.0.3](https://github.com/auth0/laravel-auth0/tree/3.0.3) (2016-01-28)
[Full Changelog](https://github.com/auth0/laravel-auth0/compare/3.0.2...3.0.3)

Expand Down
60 changes: 5 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This plugin helps you integrate your [Laravel](https://laravel.com/) WebApp with

Check our docs page to get a complete guide on how to install it in an existing project or download a pre-configured seed project:

* Regular webapp: https://auth0.com/docs/quickstart/webapp/laravel/
* Regular webapp: https://auth0.com/docs/quickstart/webapp/laravel
* Web API: https://auth0.com/docs/quickstart/backend/laravel

### Setting up a JWKs cache
Expand Down Expand Up @@ -40,58 +40,7 @@ You can implement your own cache strategy by creating a new class that implement

### Storing users in your database

You can customize the way you handle the users in your application by creating your own `UserRepository`. This class should implement the `Auth0\Login\Contract\Auth0UserRepository` contract.

```php
<?php
namespace App\Repository;

use Auth0\Login\Contract\Auth0UserRepository;

class MyCustomUserRepository implements Auth0UserRepository {

/* This class is used on api authN to fetch the user based on the jwt.*/
public function getUserByDecodedJWT($jwt) {
return $this->upsertUser($jwt);
}

public function getUserByUserInfo($userInfo) {
return $this->upsertUser($userInfo['profile']);
}

protected function upsertUser($profile) {

$user = User::where("auth0id", $profile->sub)->first();

if ($user === null) {
// If not, create one
$user = new User();
$user->email = $profile->email; // you should ask for the email scope
$user->auth0id = $profile->sub;
$user->name = $profile->name; // you should ask for the name scope
$user->save();
}

return $user;
}

public function getUserByIdentifier($identifier) {
//Get the user info of the user logged in (probably in session)
$user = \App::make('auth0')->getUser();

if ($user===null) return null;

// build the user
$user = $this->getUserByUserInfo($user);

// it is not the same user as logged in, it is not valid
if ($user && $user->auth0id == $identifier) {
return $auth0User;
}
}

}
```
You can customize the way you handle the users in your application by creating your own `UserRepository`. This class should implement the `Auth0\Login\Contract\Auth0UserRepository` contract. Please see the bottom of the [Laravel Quickstart](https://auth0.com/docs/quickstart/webapp/laravel) guide for the latest example.

### Laravel 5.2

Expand Down Expand Up @@ -129,8 +78,9 @@ In your `config/auth.php` file update the providers to use the `auth0` driver:

## Laravel Compatibility

The 2.x branch targets Laravel 5.0 and 5.1 compatibility.
Master targets Laravel 5.5 compatibility.
The 3.x branch targets Laravel 5.2 compatibility.
The 2.x branch targets Laravel 5.0 and 5.1 compatibility.

If you are working with an older version (Laravel 4.x) you need to point to composer.json to the version 1.0.*

Expand All @@ -140,7 +90,7 @@ If you have found a bug or if you have a feature request, please report them at

## Author

[Auth0](auth0.com)
[Auth0](https://auth0.com)

## License

Expand Down