src/main/php/auth/ProtectedResource.php
private function roles(Response $response, User $user)
    {
        try {
            return $this->injector->getInstance(AuthorizationProvider::class)
                    ->roles($user);
        } catch (AuthProviderException $ahe) {
            $this->handleAuthProviderException($ahe, $response);
            return null;
        }
    }
private function roles(Response $response, User $user)
    {
        try {
            return $this->injector->getInstance(AuthorizationProvider::class)
                    ->roles($user);
        } catch (AuthProviderException $ahe) {
            $this->handleAuthProviderException($ahe, $response);
            return null;
        }
    }
private function roles ( Response $ response , User $ user ) { try { return $ this -> injector -> getInstance ( AuthorizationProvider :: class ) -> roles ( $ user ) ; } catch ( AuthProviderException $ ahe ) { $ this -> handleAuthProviderException ( $ ahe , $ response ) ; return null ; } }
checks whether expected role is given

@param   \stubbles\webapp\Response   $response  response to send
@param   \stubbles\webapp\auth\User  $user
@return  \stubbles\webapp\auth\Roles|null
checks whether expected role is given