wip3
This commit is contained in:
parent
737648359d
commit
53a1a3fad1
@ -21,8 +21,16 @@ security:
|
|||||||
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
||||||
security: false
|
security: false
|
||||||
oauth_token:
|
oauth_token:
|
||||||
pattern: ^/oauth/(token|authorize)$
|
pattern: ^/oauth/token$
|
||||||
security: false
|
security: false
|
||||||
|
oauth_authorize:
|
||||||
|
pattern: ^/oauth/authorize$
|
||||||
|
security: true
|
||||||
|
entry_point: App\Security\Authenticator
|
||||||
|
guard:
|
||||||
|
authenticators:
|
||||||
|
- App\Security\Authenticator
|
||||||
|
provider: local_user
|
||||||
oauth:
|
oauth:
|
||||||
guard:
|
guard:
|
||||||
authenticators:
|
authenticators:
|
||||||
|
@ -81,6 +81,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|||||||
use SymfonyCasts\Bundle\ResetPassword\ResetPasswordHelperInterface;
|
use SymfonyCasts\Bundle\ResetPassword\ResetPasswordHelperInterface;
|
||||||
use SymfonyCasts\Bundle\VerifyEmail\VerifyEmailHelperInterface;
|
use SymfonyCasts\Bundle\VerifyEmail\VerifyEmailHelperInterface;
|
||||||
use Trikoder\Bundle\OAuth2Bundle\Event\UserResolveEvent;
|
use Trikoder\Bundle\OAuth2Bundle\Event\UserResolveEvent;
|
||||||
|
use Trikoder\Bundle\OAuth2Bundle\OAuth2Events;
|
||||||
use Twig\Environment;
|
use Twig\Environment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -294,7 +295,7 @@ class GNUsocial implements EventSubscriberInterface
|
|||||||
return [
|
return [
|
||||||
KernelEvents::REQUEST => 'onKernelRequest',
|
KernelEvents::REQUEST => 'onKernelRequest',
|
||||||
'console.command' => 'onCommand',
|
'console.command' => 'onCommand',
|
||||||
'trikoder.oauth2.user_resolve' => 'userResolve',
|
OAuth2Events::USER_RESOLVE => 'userResolve',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,8 @@ class Authenticator extends AbstractFormLoginAuthenticator implements Authentica
|
|||||||
|
|
||||||
public function supports(Request $request): bool
|
public function supports(Request $request): bool
|
||||||
{
|
{
|
||||||
return self::LOGIN_ROUTE === $request->attributes->get('_route') && $request->isMethod('POST');
|
return (self::LOGIN_ROUTE === $request->attributes->get('_route') && $request->isMethod('POST'))
|
||||||
|
|| ('oauth2_authorize' === $request->attributes->get('_route'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user