public function authorize(){
        $this->application->loadAppToken();

        if( ! $this->application->haveAppToken()){
            $this->askAuthorization();
            while( in_array( $this->status, [self::STATUS_UNKNOWN, self::STATUS_PENDING])){
                $this->getAuthorizationStatus();
                if( $this->status == self::STATUS_GRANTED){
                    $this->application->setAppToken( $this->app_token);
                    $this->application->saveAppToken();
                    break;
                }
                sleep( 5);
            }

            /// For verbose
            switch( $this->status){
                case self::STATUS_GRANTED : $this->application->getLogger()->addInfo( 'Access granted !'); break;
                case self::STATUS_TIMEOUT : $this->application->getLogger()->addCritical( 'Access denied. You take to long to authorize app'); break;
                case self::STATUS_DENIED  : $this->application->getLogger()->addCritical( 'Access denied. Freebox denied app connexion'); break;
            }
        }
    }