Skip to content

update namespace #2

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

Merged
merged 1 commit into from
Feb 2, 2022
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
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ Installation
Installation using composer:

```sh
composer require designmynight/laravel-mongodb-passport
composer require sysvale/laravel-mongodb-passport
```

You need to have your `App\User` class extend `DesignMyNight\Mongodb\Auth\User.php` instead of the default `Illuminate\Foundation\Auth\User`. This user class extends larvel-mongodb eloquent user as well as adding all the standard and required authentication and laravel passport traits.
You need to have your `App\User` class extend `Sysvale\Mongodb\Auth\User.php` instead of the default `Illuminate\Foundation\Auth\User`. This user class extends larvel-mongodb eloquent user as well as adding all the standard and required authentication and laravel passport traits.

```php
<?php

namespace App;

use Illuminate\Notifications\Notifiable;
use DesignMyNight\Mongodb\Auth\User as Authenticatable;
use Sysvale\Mongodb\Auth\User as Authenticatable;

class User extends Authenticatable
{
Expand All @@ -41,17 +41,17 @@ class User extends Authenticatable
5.5.x | 4.0.x, 5.0.x, 6.0.x, 7.0.x | 1.1.x
5.6.x | 4.0.x, 5.0.x, 6.0.x, 7.0.x | 1.1.x
6.x | 4.0.x, 5.0.x, 6.0.x, 7.x, 8.x| 1.2.x

And add the service provider in `config/app.php`:

```php
DesignMyNight\Mongodb\MongodbPassportServiceProvider::class,
Sysvale\Mongodb\MongodbPassportServiceProvider::class,
```

For usage with [Lumen](http://lumen.laravel.com), add the service provider in `bootstrap/app.php`.

```php
$app->register(DesignMyNight\Mongodb\MongodbPassportServiceProvider::class);
$app->register(Sysvale\Mongodb\MongodbPassportServiceProvider::class);
```

The service provider will overide the default laravel passport models in order to use mongodb's implementation of eloquent. There is no need to register any additional classes or add any additional configuration other than those outlined in [Laravel Passport](https://github.com/laravel/passport) and [MongoDB](https://github.com/jenssegers/laravel-mongodb).
2 changes: 1 addition & 1 deletion src/Auth/User.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace DesignMyNight\Mongodb\Auth;
namespace Sysvale\Mongodb\Auth;

use Illuminate\Auth\Authenticatable;
use Illuminate\Auth\Passwords\CanResetPassword;
Expand Down
4 changes: 2 additions & 2 deletions src/Console/ClientCommand.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace DesignMyNight\Mongodb\Console;
namespace Sysvale\Mongodb\Console;

use DesignMyNight\Mongodb\Passport\Client;
use Sysvale\Mongodb\Passport\Client;
use Laravel\Passport\ClientRepository;
use Laravel\Passport\Console\ClientCommand as PassportClientCommand;

Expand Down
14 changes: 7 additions & 7 deletions src/MongodbPassportServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace DesignMyNight\Mongodb;
namespace Sysvale\Mongodb;

use Illuminate\Support\ServiceProvider;
use DesignMyNight\Mongodb\Passport\AuthCode;
use DesignMyNight\Mongodb\Console\ClientCommand;
use DesignMyNight\Mongodb\Passport\Bridge\RefreshTokenRepository;
use DesignMyNight\Mongodb\Passport\Client;
use DesignMyNight\Mongodb\Passport\PersonalAccessClient;
use DesignMyNight\Mongodb\Passport\Token;
use Sysvale\Mongodb\Passport\AuthCode;
use Sysvale\Mongodb\Console\ClientCommand;
use Sysvale\Mongodb\Passport\Bridge\RefreshTokenRepository;
use Sysvale\Mongodb\Passport\Client;
use Sysvale\Mongodb\Passport\PersonalAccessClient;
use Sysvale\Mongodb\Passport\Token;
use Laravel\Passport\Bridge\RefreshTokenRepository as PassportRefreshTokenRepository;
use Laravel\Passport\Console\ClientCommand as PassportClientCommand;
use Laravel\Passport\Passport;
Expand Down
2 changes: 1 addition & 1 deletion src/Passport/AuthCode.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace DesignMyNight\Mongodb\Passport;
namespace Sysvale\Mongodb\Passport;

use Jenssegers\Mongodb\Eloquent\Model;

Expand Down
4 changes: 2 additions & 2 deletions src/Passport/Bridge/RefreshToken.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace DesignMyNight\Mongodb\Passport\Bridge;
namespace Sysvale\Mongodb\Passport\Bridge;

use Jenssegers\Mongodb\Eloquent\Model;
use League\OAuth2\Server\Entities\RefreshTokenEntityInterface;
Expand All @@ -9,7 +9,7 @@

/**
* Class RefreshToken
* @package DesignMyNight\Mongodb\Passport\Bridge
* @package Sysvale\Mongodb\Passport\Bridge
*/
class RefreshToken extends Model implements RefreshTokenEntityInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Passport/Bridge/RefreshTokenRepository.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace DesignMyNight\Mongodb\Passport\Bridge;
namespace Sysvale\Mongodb\Passport\Bridge;

use Laravel\Passport\Bridge\RefreshTokenRepository as BaseRefreshTokenRepository;
use Laravel\Passport\Events\RefreshTokenCreated;
Expand Down
4 changes: 2 additions & 2 deletions src/Passport/Client.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace DesignMyNight\Mongodb\Passport;
namespace Sysvale\Mongodb\Passport;

use Jenssegers\Mongodb\Eloquent\Model;

Expand Down Expand Up @@ -79,7 +79,7 @@ public function skipsAuthorization()
{
return false;
}

/**
* Determine if the client is a confidential client.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Passport/PersonalAccessClient.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace DesignMyNight\Mongodb\Passport;
namespace Sysvale\Mongodb\Passport;

use Jenssegers\Mongodb\Eloquent\Model;

Expand Down
2 changes: 1 addition & 1 deletion src/Passport/PersonalAccessTokenFactory.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace DesignMyNight\Mongodb\Passport;
namespace Sysvale\Mongodb\Passport;

use Zend\Diactoros\Response;
use Zend\Diactoros\ServerRequest;
Expand Down
4 changes: 2 additions & 2 deletions src/Passport/RefreshToken.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
<?php

namespace DesignMyNight\Mongodb\Passport;
namespace Sysvale\Mongodb\Passport;

use Jenssegers\Mongodb\Eloquent\Model;

Expand Down
2 changes: 1 addition & 1 deletion src/Passport/Token.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace DesignMyNight\Mongodb\Passport;
namespace Sysvale\Mongodb\Passport;

use Jenssegers\Mongodb\Eloquent\Model;

Expand Down