Skip to content

Commit

Permalink
matches function went awol, brought it back..
Browse files Browse the repository at this point in the history
functions added to contract
styling fixed for SP
  • Loading branch information
Dylan-DPC committed Jul 17, 2017
1 parent 7c8e2f1 commit 5c44abf
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/AuthValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ public function generateNonce(Model $content): string
return $this->generator->generate($content);
}

public function matches(Model $content, string $nonce)
{
return $this->generator->matches($content, $nonce);
}

public function validate(array $params)
{
return $this->validator->verify($params);
Expand Down
7 changes: 7 additions & 0 deletions src/AuthValidatorContract.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
namespace Dpc\HashVerifier;


use Illuminate\Database\Eloquent\Model;

interface AuthValidatorContract
{

public function generateNonce(Model $content): string;

public function matches(Model $content, string $nonce);

public function validate(array $params);
}
4 changes: 2 additions & 2 deletions src/AuthValidatorServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ class AuthValidatorServiceProvider extends ServiceProvider
*/
public function boot()
{
$this->publishes([
$this->publishes([
__DIR__ . '/../config/validator.php' => config_path('validator.php'),
], 'config');
], 'config');

}

Expand Down

0 comments on commit 5c44abf

Please sign in to comment.