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

add authorize view #22

Merged
merged 5 commits into from
Feb 25, 2024
Merged
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ docs
phpunit.xml
phpstan.neon
testbench.yaml
vendor
/vendor
node_modules
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Using Laravel installer

```bash
laravel new jetpass-app --stack=livewire --jet --dark --api --dev
laravel new jetpass-app --stack=livewire --jet --dark --api --pest --dev
```

Using Composer
Expand Down
65 changes: 65 additions & 0 deletions stubs/resources/views/vendor/passport/authorize.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<x-guest-layout>

<div class="fixed top-0 min-w-full px-6 py-3 mb-0 text-center bg-white border-b-1 border-grey-light text-grey-lightest dark:bg-gray-800">
Authorization Request
</div>

<x-authentication-card>
<x-slot name="logo">
<x-authentication-card-logo />
</x-slot>



<div class="mb-4 text-sm text-gray-600 dark:text-gray-400">
<p><strong>{{ $client->name }}</strong> is requesting permission to access your account.</p>
</div>

<!-- Scope List -->
@if (count($scopes) > 0)
<div class="scopes">
<p><strong>This application will be able to:</strong></p>

<ul>
@foreach ($scopes as $scope)
<li>{{ $scope->description }}</li>
@endforeach
</ul>
</div>
@endif

<x-validation-errors class="mb-4" />
<div class="flex items-center justify-end mt-4">

<form method="POST" action="{{ route('passport.authorizations.deny') }}">
@csrf
@method('DELETE')

<input type="hidden" name="state" value="{{ $request->state }}">
<input type="hidden" name="client_id" value="{{ $client->id }}">
<input type="hidden" name="auth_token" value="{{ $authToken }}">

<div class="flex justify-end mt-4">
<x-button class="ml-4 bg-red-500 dark:bg-red-800">
{{ __('Cancel') }}
</x-button>
</div>
</form>

<form method="POST" action="{{ route('passport.authorizations.approve') }}">
@csrf

<input type="hidden" name="state" value="{{ $request->state }}">
<input type="hidden" name="client_id" value="{{ $client->id }}">
<input type="hidden" name="auth_token" value="{{ $authToken }}">
<div class="flex justify-end mt-4">
<x-button class="ml-4">
{{ __('Authorize') }}
</x-button>
</div>
</form>

</div>

</x-authentication-card>
</x-guest-layout>