Verified against Semitexa Ultimate 2026.09.19.1020

Authorization attributes

Every attribute declared by Authorization, with the signature the code has and a usage quoted from the codebase.

#[AsProtectedPayload]

Semitexa\Authorization\Attribute\AsProtectedPayload

Applies to: class

parameter type required
doc string no
base string no
overrides string no
path string no
methods array no
name string no
requirements array no
defaults array no
options array no
tags array no
responseWith string no
consumes array no
produces array no
transport Semitexa\Core\Attribute\TransportType no
renderProfile Semitexa\Core\Resource\RenderProfile|array|null no
responsesByProfile array no
sseGateModel Semitexa\Core\Attribute\SseGateModel no
#[AsProtectedPayload(
    path: '/admin/users',
    methods: ['GET'],
    responseWith: UserListResource::class,
)]
final class UserListPayload

— vendor/semitexa/demo/resources/examples/Auth/ProtectedRoute/UserListPayload.example.php

#[AsServicePayload]

Semitexa\Authorization\Attribute\AsServicePayload

Applies to: class

parameter type required
doc string no
base string no
overrides string no
path string no
methods array no
name string no
requirements array no
defaults array no
options array no
tags array no
responseWith string no
consumes array no
produces array no
transport Semitexa\Core\Attribute\TransportType no
renderProfile Semitexa\Core\Resource\RenderProfile|array|null no
responsesByProfile array no
sseGateModel Semitexa\Core\Attribute\SseGateModel no
#[AsServicePayload(
    path: '/api/products',
    methods: ['GET'],
    responseWith: ProductListResource::class,
    produces: ['application/json'],
)]
final class ProductListPayload

— vendor/semitexa/demo/resources/examples/Auth/MachineAuth/ProductListPayload.example.php

#[RequiresCapability]

Semitexa\Authorization\Attribute\RequiresCapability

Applies to: class. Repeatable.

parameter type required
capability Semitexa\Authorization\Domain\Contract\CapabilityInterface yes
#[RequiresCapability('backoffice.access')]
#[RequiresPermission('products.write')]
#[AsPayloadHandler(payload: UpdateProductPayload::class, resource: ProductWriteResource::class)]
final class RbacHandler implements TypedHandlerInterface

— vendor/semitexa/demo/resources/examples/Auth/Rbac/RbacHandler.example.php

#[RequiresPermission]

Semitexa\Authorization\Attribute\RequiresPermission

Applies to: class. Repeatable.

parameter type required
permission string yes
#[RequiresPermission('users.manage')]
#[AsPayloadHandler(payload: UserListPayload::class, resource: UserListResource::class)]
final class ProtectedRouteHandler implements TypedHandlerInterface

— vendor/semitexa/demo/resources/examples/Auth/ProtectedRoute/ProtectedRouteHandler.example.php