PHP 클래스 eZ\Publish\Core\MVC\Symfony\Security\EventListener\SecurityListener

Also listens to kernel.request to: - Check if current user (authenticated or not) can access to current SiteAccess
상속: implements Symfony\Component\EventDispatcher\EventSubscriberInterface
파일 보기 프로젝트 열기: ezsystems/ezpublish-kernel 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$authorizationChecker Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface
$configResolver eZ\Publish\Core\MVC\ConfigResolverInterface
$eventDispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface
$fragmentPath string ..).
$repository eZ\Publish\API\Repository\Repository
$tokenStorage Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface

공개 메소드들

메소드 설명
__construct ( eZ\Publish\API\Repository\Repository $repository, eZ\Publish\Core\MVC\ConfigResolverInterface $configResolver, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher, Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface $tokenStorage, Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface $authorizationChecker, $fragmentPath = '/_fragment' )
checkSiteAccessPermission ( Symfony\Component\Security\Http\Event\InteractiveLoginEvent $event ) Throws an UnauthorizedSiteAccessException if current user doesn't have permission to current SiteAccess.
getSubscribedEvents ( )
onInteractiveLogin ( Symfony\Component\Security\Http\Event\InteractiveLoginEvent $event ) Tries to retrieve a valid eZ user if authenticated user doesn't come from the repository (foreign user provider).
onKernelRequest ( GetResponseEvent $event ) Throws an UnauthorizedSiteAccessException if current user doesn't have access to current SiteAccess.

보호된 메소드들

메소드 설명
getUser ( Symfony\Component\Security\Core\User\UserInterface $originalUser, eZ\Publish\API\Repository\Values\User\User $apiUser ) : eZ\Publish\Core\MVC\Symfony\Security\UserInterface Returns new user object based on original user and provided API user.
hasAccess ( SiteAccess $siteAccess ) : boolean Returns true if current user has access to given SiteAccess.

비공개 메소드들

메소드 설명
isMasterRequest ( Request $request, $requestType ) : boolean Returns true if given request is considered as a master request.

메소드 상세

__construct() 공개 메소드

public __construct ( eZ\Publish\API\Repository\Repository $repository, eZ\Publish\Core\MVC\ConfigResolverInterface $configResolver, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher, Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface $tokenStorage, Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface $authorizationChecker, $fragmentPath = '/_fragment' )
$repository eZ\Publish\API\Repository\Repository
$configResolver eZ\Publish\Core\MVC\ConfigResolverInterface
$eventDispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface
$tokenStorage Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface
$authorizationChecker Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface

checkSiteAccessPermission() 공개 메소드

Throws an UnauthorizedSiteAccessException if current user doesn't have permission to current SiteAccess.
public checkSiteAccessPermission ( Symfony\Component\Security\Http\Event\InteractiveLoginEvent $event )
$event Symfony\Component\Security\Http\Event\InteractiveLoginEvent

getSubscribedEvents() 공개 정적인 메소드

public static getSubscribedEvents ( )

getUser() 보호된 메소드

One may want to override this method to use their own user class.
protected getUser ( Symfony\Component\Security\Core\User\UserInterface $originalUser, eZ\Publish\API\Repository\Values\User\User $apiUser ) : eZ\Publish\Core\MVC\Symfony\Security\UserInterface
$originalUser Symfony\Component\Security\Core\User\UserInterface
$apiUser eZ\Publish\API\Repository\Values\User\User
리턴 eZ\Publish\Core\MVC\Symfony\Security\UserInterface

hasAccess() 보호된 메소드

Returns true if current user has access to given SiteAccess.
protected hasAccess ( SiteAccess $siteAccess ) : boolean
$siteAccess eZ\Publish\Core\MVC\Symfony\SiteAccess
리턴 boolean

onInteractiveLogin() 공개 메소드

Will dispatch an event allowing listeners to return a valid eZ user for current authenticated user. Will by default let the repository load the anonymous user.
public onInteractiveLogin ( Symfony\Component\Security\Http\Event\InteractiveLoginEvent $event )
$event Symfony\Component\Security\Http\Event\InteractiveLoginEvent

onKernelRequest() 공개 메소드

Throws an UnauthorizedSiteAccessException if current user doesn't have access to current SiteAccess.
public onKernelRequest ( GetResponseEvent $event )
$event Symfony\Component\HttpKernel\Event\GetResponseEvent

프로퍼티 상세

$authorizationChecker 보호되어 있는 프로퍼티

protected AuthorizationCheckerInterface,Symfony\Component\Security\Core\Authorization $authorizationChecker
리턴 Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface

$configResolver 보호되어 있는 프로퍼티

protected ConfigResolverInterface,eZ\Publish\Core\MVC $configResolver
리턴 eZ\Publish\Core\MVC\ConfigResolverInterface

$eventDispatcher 보호되어 있는 프로퍼티

protected EventDispatcherInterface,Symfony\Component\EventDispatcher $eventDispatcher
리턴 Symfony\Component\EventDispatcher\EventDispatcherInterface

$fragmentPath 보호되어 있는 프로퍼티

..).
protected string $fragmentPath
리턴 string

$repository 보호되어 있는 프로퍼티

protected Repository,eZ\Publish\API\Repository $repository
리턴 eZ\Publish\API\Repository\Repository

$tokenStorage 보호되어 있는 프로퍼티

protected TokenStorageInterface,Symfony\Component\Security\Core\Authentication\Token\Storage $tokenStorage
리턴 Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface