Skip to content

Commit

Permalink
Merge pull request #22 from headerx/1.x
Browse files Browse the repository at this point in the history
add authorize view
  • Loading branch information
inmanturbo authored Feb 25, 2024
2 parents 0c298a4 + 0846885 commit 7fe2eff
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 2 deletions.
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>

0 comments on commit 7fe2eff

Please sign in to comment.