메소드 |
설명 |
|
__construct ( string $realm, null $loop = null ) |
|
|
addAuthorizationRule ( $args ) : string |
rules look like (JSON)
{
"role": "some_role",
"action": "publish",
"uri": "some.uri",
"allow": true
} |
|
flushAuthorizationRules ( boolean $allowByDefault = false ) : string |
|
|
getAuthorizationRules ( ) : Result |
|
|
getSubscribedEvents ( ) : array |
Listen for Router events |
|
getSubscribedRealmEvents ( ) : array |
|
|
handleMessage ( MessageEvent $messageEvent ) |
|
|
handleNewRealm ( NewRealmEvent $newRealmEvent ) |
|
|
initModule ( Thruway\Peer\RouterInterface $router, React\EventLoop\LoopInterface $loop ) |
Gets called when the module is initialized in the router |
|
isAuthorizedTo ( Session $session, Thruway\Message\ActionMessageInterface $actionMsg ) : boolean |
Check to see if an action is authorized on a specific uri given the
context of the session attempting the action |
|
isReady ( ) : boolean |
|
|
isValidAction ( $action ) : boolean |
|
|
isValidRuleUri ( $uri ) : boolean |
|
|
onSessionStart ( ClientSession $session, Thruway\Transport\TransportInterface $transport ) |
|
|
removeAuthorizationRule ( $args ) |
|
|
setReady ( boolean $ready ) |
|
|
testAuthorization ( $args ) : boolean | mixed |
Arguments need to be [["role1", "role2"], "publish|subscribe|register|call", "my.uri"] |
|