Compare commits

...

12 Commits

Author SHA1 Message Date
snipe 2aa9412565 Bumped version
# Conflicts:
#	config/version.php
2020-11-09 23:09:46 -08:00
snipe 35ab5c7df0 Bumped version 2020-11-09 23:09:10 -08:00
snipe 8a7cd87644 Merge remote-tracking branch 'origin/develop' 2020-11-09 23:05:40 -08:00
snipe 1cdf6f8263 Fixed #8673 - added category to accessories listing on Account > Assigned Assets 2020-11-09 23:05:19 -08:00
snipe b8ad930690 Merge remote-tracking branch 'origin/develop' 2020-11-09 22:55:42 -08:00
snipe ec14a117b7 Display on the API token page the expiration in years
TODO: Translate these strings
2020-11-09 22:55:27 -08:00
snipe b7cc12a466 Merge remote-tracking branch 'origin/develop' 2020-11-09 22:53:23 -08:00
snipe f4080a7aa9 Fixed created_at and expired_at order in API token screen 2020-11-09 22:53:07 -08:00
snipe 5abfbdd1d2 Allow API token expiration in years to be configured via env 2020-11-09 22:52:55 -08:00
snipe 31bbb2d035 Merge remote-tracking branch 'origin/develop' 2020-11-09 22:43:41 -08:00
snipe 33dca84ec7 Show expiry and created at date on API token page 2020-11-09 22:43:27 -08:00
snipe 460485d843 Make API tokens expire in 20 years
TODO: Make this configurable and report the expiration in the UI
2020-11-09 22:33:43 -08:00
10 changed files with 62 additions and 41 deletions
+1
View File
@@ -76,6 +76,7 @@ ENCRYPT=false
COOKIE_NAME=snipeit_session
COOKIE_DOMAIN=null
SECURE_COOKIES=false
API_TOKEN_EXPIRATION_YEARS=40
# --------------------------------------------
# OPTIONAL: SECURITY HEADER SETTINGS
+3 -2
View File
@@ -87,8 +87,9 @@ class AuthServiceProvider extends ServiceProvider
$this->registerPolicies();
Passport::routes();
Passport::tokensExpireIn(Carbon::now()->addYears(20));
Passport::refreshTokensExpireIn(Carbon::now()->addYears(20));
Passport::tokensExpireIn(Carbon::now()->addYears(config('passport.expiration_years')));
Passport::refreshTokensExpireIn(Carbon::now()->addYears(config('passport.expiration_years')));
Passport::personalAccessTokensExpireIn(Carbon::now()->addYears(config('passport.expiration_years')));
Passport::withCookieSerialization();
+1
View File
@@ -12,4 +12,5 @@ return [
*/
'private_key' => env('PASSPORT_PRIVATE_KEY'),
'public_key' => env('PASSPORT_PUBLIC_KEY'),
'expiration_years' => env('API_TOKEN_EXPIRATION_YEARS', 20),
];
+5 -5
View File
@@ -1,10 +1,10 @@
<?php
return array (
'app_version' => 'v5.0.5',
'full_app_version' => 'v5.0.5-52-g63a8535de',
'build_version' => '5509',
'app_version' => 'v5.0.6',
'full_app_version' => 'v5.0.6-5526-g8a7cd8764',
'build_version' => '5526',
'prerelease_version' => '',
'hash_version' => 'g63a8535de',
'full_hash' => 'v5.0.5-52-g63a8535de',
'hash_version' => 'g8a7cd8764',
'full_hash' => 'v5.0.6-5526-g8a7cd8764',
'branch' => 'master',
);
File diff suppressed because one or more lines are too long
+26 -26
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -1,5 +1,5 @@
{
"/js/build/app.js": "/js/build/app.js?id=fc54bb0c7977c14f519b",
"/js/build/app.js": "/js/build/app.js?id=df0e9d334d5c0b0eb048",
"/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=59413334823616b81341",
"/css/build/app.css": "/css/build/app.css?id=032fd8c3fce99c7fd862",
"/css/build/overrides.css": "/css/build/overrides.css?id=0b4aefd7ef0c117ef23a",
@@ -34,5 +34,5 @@
"/css/dist/bootstrap-table.css": "/css/dist/bootstrap-table.css?id=1e77fde04b3f42432581",
"/js/build/vendor.js": "/js/build/vendor.js?id=aff75d5aad5e7b429723",
"/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=58d95c93430f2ae33392",
"/js/dist/all.js": "/js/dist/all.js?id=0a2c2c95ab18fa16faa1"
"/js/dist/all.js": "/js/dist/all.js?id=5dc677546cc6d86e605d"
}
@@ -31,8 +31,10 @@
<table class="table table-borderless m-b-none" v-if="tokens.length > 0">
<thead>
<tr>
<th class="col-md-9">Name</th>
<th class="col-md-3"><span class="sr-only">Delete</span></th>
<th class="col-md-3">Name</th>
<th class="col-md-2">Created</th>
<th class="col-md-2">Expires</th>
<th class="col-md-2"><span class="sr-only">Delete</span></th>
</tr>
</thead>
@@ -43,6 +45,14 @@
{{ token.name }}
</td>
<td style="vertical-align: middle;">
{{ token.created_at }}
</td>
<td style="vertical-align: middle;">
{{ token.expires_at }}
</td>
<!-- Delete Button -->
<td style="vertical-align: middle;" class="text-right">
<a class="action-link btn btn-danger btn-sm" @click="revoke(token)">
+2
View File
@@ -27,6 +27,8 @@
<code>{{ url('/api/v1') }}</code></p>
<p>When you generate an API token, be sure to copy it down immediately as they will not be visible to you again. </p>
<p>API tokens will expire in {{ config('passport.expiration_years') }} years.</p>
</div>
</div>
@@ -154,8 +154,9 @@ View Assets for {{ $user->present()->fullName() }}
}'>
<thead>
<tr>
<th class="col-md-5">{{ trans('general.name') }}</th>
<th class="col-md-4">{{ trans('general.name') }}</th>
<th class="col-md-4">{{ trans('admin/hardware/form.serial') }}</th>
<th class="col-md-4">{{ trans('general.category') }}</th>
</tr>
</thead>
<tbody>
@@ -169,6 +170,7 @@ View Assets for {{ $user->present()->fullName() }}
------------
@endcan
</td>
<td>{{ $license->category->name }}</td>
</tr>
@endforeach
</tbody>
@@ -211,13 +213,15 @@ View Assets for {{ $user->present()->fullName() }}
}'>
<thead>
<tr>
<th class="col-md-12">{{ trans('general.name') }}</th>
<th class="col-md-8">{{ trans('general.name') }}</th>
<th class="col-md-4">{{ trans('general.category') }}</th>
</tr>
</thead>
<tbody>
@foreach ($user->consumables as $consumable)
<tr>
<td>{{ $consumable->name }}</td>
<td>{{ $consumable->category->name }}</td>
</tr>
@endforeach
</tbody>
@@ -264,13 +268,15 @@ View Assets for {{ $user->present()->fullName() }}
}'>
<thead>
<tr>
<th class="col-md-12">Name</th>
<th class="col-md-8">{{ trans('general.name') }}</th>
<th class="col-md-4">{{ trans('general.category') }}</th>
</tr>
</thead>
<tbody>
@foreach ($user->accessories as $accessory)
<tr>
<td>{{ $accessory->name }}</td>
<td>{{ $accessory->category->name }}</td>
</tr>
@endforeach
</tbody>