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