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

Develop #8

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
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
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changelog

All notable changes to `compass/api-guard` will be documented in this file.

## 1.1.0 - 2018-XX-XX

- d982f5d054777fe8fa5c05ada953d72015d110f5 - Changelog Implementation (#2)

## 1.0.0 - 2018-09-08

* Initial release
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "chrisbjr/api-guard",
"name": "compass/api-guard",
"description": "A simple way of authenticating your APIs with API keys using Laravel",
"keywords": [
"api",
Expand Down Expand Up @@ -31,7 +31,7 @@
},
"autoload": {
"psr-4": {
"Chrisbjr\\ApiGuard\\": "src"
"Compass\\ApiGuard\\": "src"
}
},
"minimum-stability": "stable"
Expand Down
4 changes: 2 additions & 2 deletions src/Console/Commands/GenerateApiKey.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace Chrisbjr\ApiGuard\Console\Commands;
namespace Compass\ApiGuard\Console\Commands;

use Chrisbjr\ApiGuard\Models\ApiKey;
use Compass\ApiGuard\Models\ApiKey;
use Illuminate\Console\Command;

class GenerateApiKey extends Command
Expand Down
4 changes: 2 additions & 2 deletions src/Events/ApiKeyAuthenticated.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace Chrisbjr\ApiGuard\Events;
namespace Compass\ApiGuard\Events;

use Chrisbjr\ApiGuard\Models\ApiKey;
use Compass\ApiGuard\Models\ApiKey;
use Illuminate\Queue\SerializesModels;

class ApiKeyAuthenticated
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/ApiGuardController.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Chrisbjr\ApiGuard\Http\Controllers;
namespace Compass\ApiGuard\Http\Controllers;

use EllipseSynergie\ApiResponse\Laravel\Response;
use Illuminate\Routing\Controller;
Expand Down
6 changes: 3 additions & 3 deletions src/Http/Middleware/AuthenticateApiKey.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace Chrisbjr\ApiGuard\Http\Middleware;
namespace Compass\ApiGuard\Http\Middleware;

use Carbon\Carbon;
use Chrisbjr\ApiGuard\Events\ApiKeyAuthenticated;
use Chrisbjr\ApiGuard\Models\Device;
use Compass\ApiGuard\Events\ApiKeyAuthenticated;
use Compass\ApiGuard\Models\Device;
use Closure;

class AuthenticateApiKey
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Requests/ApiGuardFormRequest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Chrisbjr\ApiGuard\Http\Requests;
namespace Compass\ApiGuard\Http\Requests;

use EllipseSynergie\ApiResponse\Laravel\Response;
use Illuminate\Contracts\Validation\Validator;
Expand Down
4 changes: 2 additions & 2 deletions src/Models/ApiKey.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Chrisbjr\ApiGuard\Models;
namespace Compass\ApiGuard\Models;

use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
Expand Down Expand Up @@ -36,7 +36,7 @@ public static function make($apikeyable)
{
$apiKey = new ApiKey([
'key' => self::generateKey(),
'apikeyable_id' => $apikeyable->id,
'apikeyable_id' => $apikeyable->getKey(),
'apikeyable_type' => get_class($apikeyable),
'last_ip_address' => Request::ip(),
'last_used_at' => Carbon::now(),
Expand Down
4 changes: 2 additions & 2 deletions src/Models/Mixins/Apikeyable.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace Chrisbjr\ApiGuard\Models\Mixins;
namespace Compass\ApiGuard\Models\Mixins;

use Chrisbjr\ApiGuard\Models\ApiKey;
use Compass\ApiGuard\Models\ApiKey;

trait Apikeyable
{
Expand Down
6 changes: 3 additions & 3 deletions src/Providers/ApiGuardServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Chrisbjr\ApiGuard\Providers;
namespace Compass\ApiGuard\Providers;

use Chrisbjr\ApiGuard\Console\Commands\GenerateApiKey;
use Chrisbjr\ApiGuard\Http\Middleware\AuthenticateApiKey;
use Compass\ApiGuard\Console\Commands\GenerateApiKey;
use Compass\ApiGuard\Http\Middleware\AuthenticateApiKey;
use Illuminate\Routing\Router;
use Illuminate\Support\Facades\App;
use Illuminate\Support\ServiceProvider;
Expand Down