mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 12:07:23 +08:00
oauth locale
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Http;
|
namespace App\Http;
|
||||||
|
|
||||||
|
use App\Http\Middleware\Locale;
|
||||||
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
||||||
|
|
||||||
class Kernel extends HttpKernel
|
class Kernel extends HttpKernel
|
||||||
@@ -38,6 +39,7 @@ class Kernel extends HttpKernel
|
|||||||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||||
\App\Http\Middleware\VerifyCsrfToken::class,
|
\App\Http\Middleware\VerifyCsrfToken::class,
|
||||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||||
|
Locale::class,
|
||||||
],
|
],
|
||||||
|
|
||||||
'api' => [
|
'api' => [
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.9');
|
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.9');
|
||||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2024-03-11');
|
defined('RELEASE_DATE') || define('RELEASE_DATE', '2024-03-15');
|
||||||
defined('IN_TRACKER') || define('IN_TRACKER', false);
|
defined('IN_TRACKER') || define('IN_TRACKER', false);
|
||||||
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
||||||
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 522 KiB |
@@ -6,4 +6,8 @@ return [
|
|||||||
'revoked' => 'Valid',
|
'revoked' => 'Valid',
|
||||||
'access_token' => 'Access token',
|
'access_token' => 'Access token',
|
||||||
'refresh_token' => 'Refresh token',
|
'refresh_token' => 'Refresh token',
|
||||||
|
'authorization_request_title' => 'Authorization Request',
|
||||||
|
'authorization_request_desc' => 'is requesting permission to access your account',
|
||||||
|
'btn_approve' => 'Authorize',
|
||||||
|
'btn_deny' => 'Cancel',
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -6,4 +6,8 @@ return [
|
|||||||
'revoked' => '有效',
|
'revoked' => '有效',
|
||||||
'access_token' => '访问令牌',
|
'access_token' => '访问令牌',
|
||||||
'refresh_token' => '刷新令牌',
|
'refresh_token' => '刷新令牌',
|
||||||
|
'authorization_request_title' => '授权请求',
|
||||||
|
'authorization_request_desc' => '正在请求获取您账号的访问权限',
|
||||||
|
'btn_approve' => '授权',
|
||||||
|
'btn_deny' => '取消',
|
||||||
];
|
];
|
||||||
|
|||||||
+9
-7
@@ -16,16 +16,18 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
background-image: url("/pic/oauth2-authorize-bg.jpg");
|
||||||
}
|
}
|
||||||
|
|
||||||
.passport-authorize .card {
|
.passport-authorize .card {
|
||||||
/*padding: 40px;*/
|
padding: 40px;
|
||||||
|
background-color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.passport-authorize .card-header {
|
.passport-authorize .card-header {
|
||||||
font-size: 24px;
|
font-size: 36px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.passport-authorize .scopes {
|
.passport-authorize .scopes {
|
||||||
@@ -61,11 +63,11 @@
|
|||||||
<body class="passport-authorize">
|
<body class="passport-authorize">
|
||||||
<div class="card card-default">
|
<div class="card card-default">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
Authorization Request
|
{{ __('oauth.authorization_request_title') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<!-- Introduction -->
|
<!-- Introduction -->
|
||||||
<p><strong>{{ $client->name }}</strong> is requesting permission to access your account.</p>
|
<p><strong>{{ $client->name }}</strong> {{ __('oauth.authorization_request_desc') }}.</p>
|
||||||
|
|
||||||
<!-- Scope List -->
|
<!-- Scope List -->
|
||||||
@if (count($scopes) > 0)
|
@if (count($scopes) > 0)
|
||||||
@@ -88,7 +90,7 @@
|
|||||||
<input type="hidden" name="state" value="{{ $request->state }}">
|
<input type="hidden" name="state" value="{{ $request->state }}">
|
||||||
<input type="hidden" name="client_id" value="{{ $client->getKey() }}">
|
<input type="hidden" name="client_id" value="{{ $client->getKey() }}">
|
||||||
<input type="hidden" name="auth_token" value="{{ $authToken }}">
|
<input type="hidden" name="auth_token" value="{{ $authToken }}">
|
||||||
<button type="submit" class="btn btn-success btn-approve">Authorize</button>
|
<button type="submit" class="btn btn-success btn-approve">{{ __('oauth.btn_approve') }}</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<!-- Cancel Button -->
|
<!-- Cancel Button -->
|
||||||
@@ -99,7 +101,7 @@
|
|||||||
<input type="hidden" name="state" value="{{ $request->state }}">
|
<input type="hidden" name="state" value="{{ $request->state }}">
|
||||||
<input type="hidden" name="client_id" value="{{ $client->getKey() }}">
|
<input type="hidden" name="client_id" value="{{ $client->getKey() }}">
|
||||||
<input type="hidden" name="auth_token" value="{{ $authToken }}">
|
<input type="hidden" name="auth_token" value="{{ $authToken }}">
|
||||||
<button class="btn btn-danger">Cancel</button>
|
<button class="btn btn-danger">{{ __('oauth.btn_deny') }}</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user