Skip to content

Commit

Permalink
Merge pull request #39 from nextapps-be/feature/change-namespace-from…
Browse files Browse the repository at this point in the history
…-nextapps-to-wotz

Change namespace from 'NextApps' to 'Wotz'
  • Loading branch information
gdebrauwer authored Sep 26, 2024
2 parents 1398386 + dca724d commit 24ecb04
Show file tree
Hide file tree
Showing 20 changed files with 89 additions and 100 deletions.
40 changes: 20 additions & 20 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,72 +4,72 @@ All notable changes to `laravel-verification-code` will be documented in this fi

## 2.1.1 - 2024-03-15

- Added: Laravel 11 support ([#36](https://github.com/nextapps-be/laravel-verification-code/pull/36))
- Added: Laravel 11 support ([#36](https://github.com/wotzebra/laravel-verification-code/pull/36))

## 2.1.0 - 2023-12-15

- Added: PHP 8.3 support ([#34](https://github.com/nextapps-be/laravel-verification-code/pull/34))
- Added: PHP 8.3 support ([#34](https://github.com/wotzebra/laravel-verification-code/pull/34))

## 2.0.0 - 2023-08-25
- Verification code Model can be customized ([#33](https://github.com/nextapps-be/laravel-verification-code/pull/33))
- Expire hours changed to Expire seconds ([#32](https://github.com/nextapps-be/laravel-verification-code/pull/32))
- Add unicode support ([#30](https://github.com/nextapps-be/laravel-verification-code/pull/30))
- Drop support for PHP 7.x and Drop support for Laravel 7, Laravel 8 and Laravel 9 ([#31](https://github.com/nextapps-be/laravel-verification-code/pull/31))
- Verification code Model can be customized ([#33](https://github.com/wotzebra/laravel-verification-code/pull/33))
- Expire hours changed to Expire seconds ([#32](https://github.com/wotzebra/laravel-verification-code/pull/32))
- Add unicode support ([#30](https://github.com/wotzebra/laravel-verification-code/pull/30))
- Drop support for PHP 7.x and Drop support for Laravel 7, Laravel 8 and Laravel 9 ([#31](https://github.com/wotzebra/laravel-verification-code/pull/31))

## 1.3.0 - 2023-02-19

- Add PHP 8.2 support ([#27](https://github.com/nextapps-be/laravel-verification-code/pull/27))
- Add Laravel 10 support ([#26](https://github.com/nextapps-be/laravel-verification-code/pull/26))
- Add PHP 8.2 support ([#27](https://github.com/wotzebra/laravel-verification-code/pull/27))
- Add Laravel 10 support ([#26](https://github.com/wotzebra/laravel-verification-code/pull/26))

## 1.2.3 - 2022-05-18

- Changed: Do not purge codes that have not expired yet ([#24](https://github.com/nextapps-be/laravel-verification-code/pull/24))
- Changed: Do not purge codes that have not expired yet ([#24](https://github.com/wotzebra/laravel-verification-code/pull/24))

## 1.2.2 - 2022-05-06

- Added: parameter to verify method to prevent deleting of the code after verification ([#23](https://github.com/nextapps-be/laravel-verification-code/pull/23))
- Added: command to prune old codes from the database ([#23](https://github.com/nextapps-be/laravel-verification-code/pull/23))
- Added: parameter to verify method to prevent deleting of the code after verification ([#23](https://github.com/wotzebra/laravel-verification-code/pull/23))
- Added: command to prune old codes from the database ([#23](https://github.com/wotzebra/laravel-verification-code/pull/23))

## 1.2.1 - 2022-03-01

- Fix composer.json file to ensure package can still be used in Laravel 7/8

## 1.2.0 - 2022-03-01

- Add PHP 8.1 and Laravel 9 support ([#20](https://github.com/nextapps-be/laravel-verification-code/pull/20))
- Add PHP 8.1 and Laravel 9 support ([#20](https://github.com/wotzebra/laravel-verification-code/pull/20))

## 1.1.0 - 2021-02-15

- Add PHP 8.0 support ([#17](https://github.com/nextapps-be/laravel-verification-code/pull/17))
- Add PHP 8.0 support ([#17](https://github.com/wotzebra/laravel-verification-code/pull/17))

## 1.0.0 - 2021-01-15

- No changes

## 0.3.4 - 2020-12-16

- Verifying test verifiables is now case insensitive ([#13](https://github.com/nextapps-be/laravel-verification-code/pull/13))
- Verifying test verifiables is now case insensitive ([#13](https://github.com/wotzebra/laravel-verification-code/pull/13))

## 0.3.3 - 2020-10-23

- Verify against all codes of verifiable (instead of only first code) ([#12](https://github.com/nextapps-be/laravel-verification-code/pull/12))
- Verify against all codes of verifiable (instead of only first code) ([#12](https://github.com/wotzebra/laravel-verification-code/pull/12))

## 0.3.2 - 2020-10-22

- Fix deletion of old verification codes (again) ([#11](https://github.com/nextapps-be/laravel-verification-code/pull/11))
- Fix deletion of old verification codes (again) ([#11](https://github.com/wotzebra/laravel-verification-code/pull/11))

## 0.3.1 - 2020-10-20

- Fix deletion of old verification codes ([#10](https://github.com/nextapps-be/laravel-verification-code/pull/10))
- Fix deletion of old verification codes ([#10](https://github.com/wotzebra/laravel-verification-code/pull/10))

## 0.3.0 - 2020-10-20

- Add config option to define max amount of active verification codes per verifiable ([#9](https://github.com/nextapps-be/laravel-verification-code/pull/9))
- Big code refactor with improvements to config-file setup ([#7](https://github.com/nextapps-be/laravel-verification-code/pull/7))
- Add config option to define max amount of active verification codes per verifiable ([#9](https://github.com/wotzebra/laravel-verification-code/pull/9))
- Big code refactor with improvements to config-file setup ([#7](https://github.com/wotzebra/laravel-verification-code/pull/7))

## 0.2.0 - 2020-09-01

- Add config option to allow customization of the notification class. ([#4](https://github.com/nextapps-be/laravel-verification-code/pull/4))
- Add config option to allow customization of the notification class. ([#4](https://github.com/wotzebra/laravel-verification-code/pull/4))

## 0.1.0 - 2020-02-20

Expand Down
4 changes: 2 additions & 2 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) Evert Arnould
Copyright (c) Who Owns The Zebra

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Laravel verification code
# Laravel Verification Code

[![Latest Version on Packagist](https://img.shields.io/packagist/v/nextapps/laravel-verification-code.svg?style=flat-square)](https://packagist.org/packages/nextapps/laravel-verification-code)
[![Total Downloads](https://img.shields.io/packagist/dt/nextapps/laravel-verification-code.svg?style=flat-square)](https://packagist.org/packages/nextapps/laravel-verification-code)
[![Latest Version on Packagist](https://img.shields.io/packagist/v/wotz/laravel-verification-code.svg?style=flat-square)](https://packagist.org/packages/wotz/laravel-verification-code)
[![Total Downloads](https://img.shields.io/packagist/dt/wotz/laravel-verification-code.svg?style=flat-square)](https://packagist.org/packages/wotz/laravel-verification-code)

This package makes it possible to authenticate a user via a verification code.

Expand All @@ -10,14 +10,14 @@ This package makes it possible to authenticate a user via a verification code.
You can install this package using composer:

```bash
composer require nextapps/laravel-verification-code
composer require wotz/laravel-verification-code
```

The package will automatically register itself.

You can publish the migration with:
```bash
php artisan vendor:publish --provider="NextApps\VerificationCode\VerificationCodeServiceProvider" --tag="migrations"
php artisan vendor:publish --provider="Wotz\VerificationCode\VerificationCodeServiceProvider" --tag="migrations"
```

After publishing the migration, run the migration with:
Expand All @@ -27,22 +27,22 @@ php artisan migrate

You can publish the config file with:
```bash
php artisan vendor:publish --provider="NextApps\VerificationCode\VerificationCodeServiceProvider" --tag="config"
php artisan vendor:publish --provider="Wotz\VerificationCode\VerificationCodeServiceProvider" --tag="config"
```

## Usage

### Generate and send a verification code
```php
use NextApps\VerificationCode\VerificationCode;
use Wotz\VerificationCode\VerificationCode;

VerificationCode::send($email);
```
This will generate a verification code for the user. The code will be stored in the `verification_codes` table. An email with the generated code will then be sent to the user matching the given email address.

### Verify a verification code
```php
use NextApps\VerificationCode\VerificationCode;
use Wotz\VerificationCode\VerificationCode;

VerificationCode::verify($code, $email);
```
Expand All @@ -51,7 +51,7 @@ If the verification code is expired or does not match the user's email address,
If you do not want the code to be deleted (in case the same code needs to be verified at different points in the login flow) you can pass a third parameter.

```php
use NextApps\VerificationCode\VerificationCode;
use Wotz\VerificationCode\VerificationCode;

VerificationCode::verify($code, $email, $deleteAfterVerification);
```
Expand Down Expand Up @@ -113,9 +113,7 @@ Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

## Credits

- [Evert Arnould](https://github.com/earnould)
- [Günther Debrauwer](https://github.com/gdebrauwer)
- [Philippe Damen](https://github.com/yinx)
- [All Contributors](../../contributors)

## License
Expand Down
29 changes: 10 additions & 19 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
{
"name": "nextapps/laravel-verification-code",
"name": "wotz/laravel-verification-code",
"description": "A simple way to authenticate a user using a verification code.",
"keywords": [
"nextapps",
"laravel",
"authentication",
"verification"
"verification",
"verification code",
"one-time code"
],
"homepage": "https://github.com/nextapps-be/laravel-verification-code",
"homepage": "https://github.com/wotzebra/laravel-verification-code",
"license": "MIT",
"type": "library",
"authors": [
{
"name": "Evert Arnould",
"email": "[email protected]",
"role": "Developer"
},
{
"name": "Günther Debrauwer",
"email": "[email protected]",
"role": "Developer"
},
{
"name": "Philippe Damen",
"email": "[email protected]",
"email": "[email protected]",
"role": "Developer"
}
],
Expand All @@ -42,12 +33,12 @@
},
"autoload": {
"psr-4": {
"NextApps\\VerificationCode\\": "src"
"Wotz\\VerificationCode\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"NextApps\\VerificationCode\\Tests\\": "tests"
"Wotz\\VerificationCode\\Tests\\": "tests"
}
},
"scripts": {
Expand All @@ -62,10 +53,10 @@
"extra": {
"laravel": {
"providers": [
"NextApps\\VerificationCode\\VerificationCodeServiceProvider"
"Wotz\\VerificationCode\\VerificationCodeServiceProvider"
],
"aliases": {
"VerificationCode": "NextApps\\VerificationCode\\VerificationCode"
"VerificationCode": "Wotz\\VerificationCode\\VerificationCode"
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions config/verification-code.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@
| a verification code.
|
| It should implement the interface:
| - \NextApps\VerificationCode\Notifications\VerificationCodeCreatedInterface
| - \Wotz\VerificationCode\Notifications\VerificationCodeCreatedInterface
|
*/
'notification' => NextApps\VerificationCode\Notifications\VerificationCodeCreated::class,
'notification' => Wotz\VerificationCode\Notifications\VerificationCodeCreated::class,

/*
|--------------------------------------------------------------------------
Expand All @@ -69,10 +69,10 @@
| Here you can customize the VerificationCode class that will be used
|
| It should extend the package class:
| - \NextApps\VerificationCode\Models\VerificationCode
| - \Wotz\VerificationCode\Models\VerificationCode
|
*/
'model' => NextApps\VerificationCode\Models\VerificationCode::class,
'model' => Wotz\VerificationCode\Models\VerificationCode::class,

/*
|--------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions src/Console/PruneCommand.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace NextApps\VerificationCode\Console;
namespace Wotz\VerificationCode\Console;

use Illuminate\Console\Command;
use NextApps\VerificationCode\VerificationCode;
use Wotz\VerificationCode\VerificationCode;

class PruneCommand extends Command
{
Expand Down
4 changes: 2 additions & 2 deletions src/Models/VerificationCode.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace NextApps\VerificationCode\Models;
namespace Wotz\VerificationCode\Models;

use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Hash;
use NextApps\VerificationCode\Support\CodeGenerator;
use Wotz\VerificationCode\Support\CodeGenerator;

class VerificationCode extends Model
{
Expand Down
2 changes: 1 addition & 1 deletion src/Notifications/VerificationCodeCreated.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace NextApps\VerificationCode\Notifications;
namespace Wotz\VerificationCode\Notifications;

use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
Expand Down
2 changes: 1 addition & 1 deletion src/Notifications/VerificationCodeCreatedInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace NextApps\VerificationCode\Notifications;
namespace Wotz\VerificationCode\Notifications;

interface VerificationCodeCreatedInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Support/CodeGenerator.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace NextApps\VerificationCode\Support;
namespace Wotz\VerificationCode\Support;

use RuntimeException;

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

namespace NextApps\VerificationCode;
namespace Wotz\VerificationCode;

use Illuminate\Support\Facades\Facade;

/**
* @method static \NextApps\VerificationCode\VerificationCodeManager send(string $verifiable, string $channel = 'mail')
* @method static \NextApps\VerificationCode\VerificationCodeManager verify(string $code, string $verifiable)
* @method static \Wotz\VerificationCode\VerificationCodeManager send(string $verifiable, string $channel = 'mail')
* @method static \Wotz\VerificationCode\VerificationCodeManager verify(string $code, string $verifiable)
*
* @see \NextApps\VerificationCode\VerificationCodeManager
* @see \Wotz\VerificationCode\VerificationCodeManager
*/
class VerificationCode extends Facade
{
Expand Down
8 changes: 4 additions & 4 deletions src/VerificationCodeManager.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace NextApps\VerificationCode;
namespace Wotz\VerificationCode;

use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Notification;
use NextApps\VerificationCode\Models\VerificationCode;
use NextApps\VerificationCode\Notifications\VerificationCodeCreated;
use NextApps\VerificationCode\Notifications\VerificationCodeCreatedInterface;
use RuntimeException;
use Wotz\VerificationCode\Models\VerificationCode;
use Wotz\VerificationCode\Notifications\VerificationCodeCreated;
use Wotz\VerificationCode\Notifications\VerificationCodeCreatedInterface;

class VerificationCodeManager
{
Expand Down
4 changes: 2 additions & 2 deletions src/VerificationCodeServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace NextApps\VerificationCode;
namespace Wotz\VerificationCode;

use Illuminate\Support\ServiceProvider;
use NextApps\VerificationCode\Console\PruneCommand;
use Wotz\VerificationCode\Console\PruneCommand;

class VerificationCodeServiceProvider extends ServiceProvider
{
Expand Down
6 changes: 3 additions & 3 deletions tests/Commands/PruneCommandTest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace NextApps\VerificationCode\Tests\Feature;
namespace Wotz\VerificationCode\Tests\Feature;

use NextApps\VerificationCode\Models\VerificationCode;
use NextApps\VerificationCode\Tests\TestCase;
use Wotz\VerificationCode\Models\VerificationCode;
use Wotz\VerificationCode\Tests\TestCase;

class PruneCommandTest extends TestCase
{
Expand Down
Loading

0 comments on commit 24ecb04

Please sign in to comment.