php - Symfony2 HwioAuth - getting full profildetail from linkedin -


i opened yesterday topic questions hwioauthbundle in symfony2. symfony2 hwioauthbundle error response

thanks stloyd answer, helped me figure out how use bundle getting access linkedin.

i trying not formattedname linkedin other informations educations, skill s.o.

i not sure if possible hwioauth? config.yml

hwi_oauth: firewall_name: main resource_owners:     linkedin:         type: linkedin         client_id: %linkedin_client_id%         client_secret: %linkedin_client_secret%         scope: r_fullprofile         infos_url: 'https://api.linkedin.com/v1/people/~:(id,educations,languages,skills)?format=json'         scope:     'r_fullprofile'         paths:             educations: educations             languages: languages             skills: skills 

that security.yml:

    providers:      ....      my_custom_hwi_provider:         id: linkedin.oauth_user_provider  firewalls:     main:        ...         oauth:             resource_owners:                 linkedin: "/login/check-linkedin"             login_path: /login             failure_path: /login             oauth_user_provider:                 service: linkedin.oauth_user_provider 

this service class provider:

    <?php  namespace xxxx\utilbundle\util\oauthprovider;  use hwi\bundle\oauthbundle\security\core\user\oauthuserprovider; use hwi\bundle\oauthbundle\oauth\response\userresponseinterface;  class provider {    protected $session, $doctrine;    public function __construct($session, $doctrine) {        $this->session = $session;        $this->doctrine = $doctrine;     }       public function loaduserbyoauthuserresponse(userresponseinterface $response)    {       //data linkedin response       var_dump($response);       exit;    }  } 

as see give_out json linkedin. hier probally response , fields educations, skills empty!

    class hwi\bundle\oauthbundle\oauth\response\pathuserresponse#694 (4) {  protected $paths =>  array(8) { 'identifier' => string(2) "id" 'nickname' => string(13) "formattedname" 'realname' => string(13) "formattedname" 'email' => string(12) "emailaddress" 'profilepicture' => string(10) "pictureurl" 'educations' => string(10) "educations" 'languages' => string(9) "languages" 'skills' => string(6) "skills" } protected $response =>  array(1) {  'id' =>  string(10) "xyxyxyxyxyxyxy" } protected $resourceowner => class hwi\bundle\oauthbundle\oauth\resourceowner\linkedinresourceowner#699 (8) {   protected $options =>     array(8) {     'authorization_url' =>     string(49) "https://www.linkedin.com/uas/oauth2/authorization"     'access_token_url' =>     string(47) "https://www.linkedin.com/uas/oauth2/accesstoken"     'infos_url' =>     string(81) "https://api.linkedin.com/v1/people/~:(id,educations,languages,skills)?format=json"     'csrf' =>     bool(true)     'client_id' =>     string(12) "xyxyxyxyxyxyxy"     'client_secret' =>     string(16) "xyxyxyxyxyxyxy"     'scope' =>     string(29) "r_fullprofile"     'options' =>     array(0) {     ...    }   }   protected $paths =>    array(8) {     'identifier' =>       string(2) "id"      'nickname' =>        string(13) "formattedname"      'realname' =>        string(13) "formattedname"      'email' =>        string(12) "emailaddress"      'profilepicture' =>        string(10) "pictureurl"      'educations' =>        string(10) "educations"      'languages' =>        string(9) "languages"      'skills' =>        string(6) "skills"     }     protected $defaultoptions =>      array(6) {       'client_id' =>         null       'client_secret' =>         null       'infos_url' =>         null       'user_response_class' =>         string(54) "hwi\bundle\oauthbundle\oauth\response\pathuserresponse"       'scope' =>         null       'csrf' =>         bool(false)      }    protected $httpclient =>    class buzz\client\curl#700 (7) {       private $lastcurl =>       resource(286) of type (curl)       protected $options =>        array(2) {        ...     }    protected $ignoreerrors =>     bool(true)    protected $maxredirects =>     int(5)    protected $timeout =>     int(5)    protected $verifypeer =>     bool(true)    protected $proxy =>     null   }    protected $name =>     string(8) "linkedin"     protected $state =>     null     protected $storage =>   class hwi\bundle\oauthbundle\oauth\requestdatastorage\sessionstorage#701 (1) {     private $session =>       class symfony\component\httpfoundation\session\session#220 (3) {       ...    }   }     public $httputils =>     class symfony\component\security\http\httputils#230 (2) {     private $urlgenerator =>     class symfony\bundle\frameworkbundle\routing\router#233 (9) {      ...     }     private $urlmatcher =>     class symfony\bundle\frameworkbundle\routing\router#233 (9) {      ...    }   } }  protected $oauthtoken =>  class hwi\bundle\oauthbundle\security\core\authentication\token\oauthtoken#696 (11) {   private $accesstoken =>    string(179) "xyxyxyxyxyxyxy"    private $rawtoken =>     array(2) {      'expires_in' =>      int(5183807)      'access_token' =>       string(179) "xyxyxyxyxyxyxyxy"    }    private $refreshtoken =>   null    private $expiresin =>    int(5183807)    private $createdat =>    int(1378302276)    private $tokensecret =>    null    private $resourceownername =>    null    private $user =>    null    private $roles =>     array(0) {    }    private $authenticated =>     bool(false)     private $attributes =>     array(0) {     }  } 

}

in protected $oauthtoken => value private $authenticated => bool(false)

am authenticated? , how can access other fields r_fullprofile scope linkedin?

regards

look @ linkedin api client , first example. fetch stuff by

$linkedin->api('v1/people/~:(firstname,lastname)'); 

also, have @ api documentation. states fields can fetch , how.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -