mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Make the passport cookie name configurable
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
4ac4f9b0a9
commit
c752c2a125
|
@ -87,6 +87,7 @@ SESSION_LIFETIME=12000
|
||||||
EXPIRE_ON_CLOSE=false
|
EXPIRE_ON_CLOSE=false
|
||||||
ENCRYPT=false
|
ENCRYPT=false
|
||||||
COOKIE_NAME=snipeit_session
|
COOKIE_NAME=snipeit_session
|
||||||
|
PASSPORT_COOKIE_NAME='snipeit_passport_token'
|
||||||
COOKIE_DOMAIN=null
|
COOKIE_DOMAIN=null
|
||||||
SECURE_COOKIES=false
|
SECURE_COOKIES=false
|
||||||
API_TOKEN_EXPIRATION_YEARS=15
|
API_TOKEN_EXPIRATION_YEARS=15
|
||||||
|
|
|
@ -91,7 +91,7 @@ class AuthServiceProvider extends ServiceProvider
|
||||||
Passport::refreshTokensExpireIn(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::personalAccessTokensExpireIn(Carbon::now()->addYears(config('passport.expiration_years')));
|
||||||
|
|
||||||
Passport::cookie('snipeit_token');
|
Passport::cookie(config('passport.cookie_name'));
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -14,4 +14,5 @@ return [
|
||||||
'private_key' => env('PASSPORT_PRIVATE_KEY'),
|
'private_key' => env('PASSPORT_PRIVATE_KEY'),
|
||||||
'public_key' => env('PASSPORT_PUBLIC_KEY'),
|
'public_key' => env('PASSPORT_PUBLIC_KEY'),
|
||||||
'expiration_years' => env('API_TOKEN_EXPIRATION_YEARS', 20),
|
'expiration_years' => env('API_TOKEN_EXPIRATION_YEARS', 20),
|
||||||
|
'cookie_name' => env('PASSPORT_COOKIE_NAME', 'snipeit_passport_token'),
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue