public function authorizeFor( $user = null )
    {
        $authorization = new ezpRestAuthorizedClient();
        $authorization->rest_client_id = $this->id;
        $authorization->user_id = $user->attribute( 'contentobject_id' );

        $session = ezcPersistentSessionInstance::get();
        $session->save( $authorization );
    }