Compare commits
3
Commits
v0.9.0
..
ce72d28912
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce72d28912 | ||
|
|
f3b226a0fd | ||
|
|
7bbf7f68e4 |
No files matched your search
@@ -5,9 +5,31 @@
|
||||
[](https://github.com/alexandergabriel/filament-oauth2/actions?query=workflow%3A"Fix+PHP+code+styling"+branch%3Amain)
|
||||
[](https://packagist.org/packages/alexandergabriel/filament-oauth2)
|
||||
|
||||
> !!!
|
||||
> This Plugin is still under development and only tested with Keycloak.
|
||||
> This is my first FilamentPHP-Plugin.
|
||||
> Did not write any tests, not published to packagist yet...
|
||||
> Feedback welcome.
|
||||
> !!!
|
||||
|
||||
To be able to install you have to add/change this to/in your composer.json:
|
||||
```json
|
||||
{
|
||||
"minimum-stability": "dev",
|
||||
"repositories": [
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/AlexanderGabriel/filament-oauth2"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
|
||||
This Plugin enables OAuth2-Login for [FilamentPHP](https://filamentphp.com) Panels.
|
||||
Login and logout is done by OAuth2-Server.
|
||||
If the OAuth2-Server provides roles for your client, they will be mapped to the App\Models\Role-Model
|
||||
Non-existing Roles will be created.
|
||||
Users will be detached to roles not in the access token any more.
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -106,6 +128,7 @@ Please review [our security policy](../../security/policy) on how to report secu
|
||||
|
||||
## Credits
|
||||
|
||||
- To all helping developing and keeping alive FilamentPHP, PHP, OAuth2 and the OpenSource Ecosystem!
|
||||
- [Alexander Gabriel](https://github.com/AlexanderGabriel)
|
||||
- [All Contributors](../../contributors)
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "alexandergabriel/filament-oauth2",
|
||||
"description": "This is my package filament-oauth2",
|
||||
"description": "Enable OAuth2 Authentication to FilamentPHP Panels",
|
||||
"keywords": [
|
||||
"AlexanderGabriel",
|
||||
"laravel",
|
||||
@@ -21,7 +21,7 @@
|
||||
],
|
||||
"require": {
|
||||
"php": "^8.1",
|
||||
"filament/filament": "^3.0",
|
||||
"filament/filament": "^4.0",
|
||||
"league/oauth2-client": "*",
|
||||
"spatie/laravel-package-tools": "^1.15.0"
|
||||
},
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@ use AlexanderGabriel\FilamentOauth2\Http\Controllers\Oauth2Controller;
|
||||
use Filament\Facades\Filament;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
$panel = Filament::getCurrentPanel();
|
||||
$panel = Filament::getCurrentOrDefaultPanel();
|
||||
|
||||
Route::prefix($panel->getPath())
|
||||
->middleware($panel->getMiddleware())
|
||||
@@ -15,7 +15,7 @@ Route::prefix($panel->getPath())
|
||||
Route::name('filament-oauth2.')
|
||||
->prefix('filament-oauth2')
|
||||
->group(function () {
|
||||
Route::post('handleLogout', [Oauth2Controller::class, 'handleLogout'])->name('handleLogout');
|
||||
Route::get('handleLogout', [Oauth2Controller::class, 'handleLogout'])->name('handleLogout');
|
||||
Route::get('redirectToOauth2Server', [Oauth2Controller::class, 'redirectToOauth2Server'])
|
||||
->name('redirectToOauth2Server');
|
||||
Route::get('handleCallback', [Oauth2Controller::class, 'handleCallback'])
|
||||
|
||||
@@ -7,8 +7,8 @@ use App\Models\Role;
|
||||
use App\Models\User;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Exception;
|
||||
use Filament\Auth\Http\Responses\LoginResponse;
|
||||
use Filament\Facades\Filament;
|
||||
use Filament\Http\Responses\Auth\LoginResponse;
|
||||
use Filament\Models\Contracts\FilamentUser;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
Reference in new issue
Block a user