This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/modules/oauth/classes/Kohana/OAuth/Provider/Linkedin.php
2013-05-27 22:10:41 +10:00

79 lines
1.7 KiB
PHP

<?php defined('SYSPATH') or die('No direct script access.');
/**
* OAuth Linkedin Provider
*
* Documents for implementing Linkedin OAuth can be found at
* <http://developer.linkedin.com/docs/DOC-1251>.
*
* [!!] This class does not implement the Linkedin API. It is only an
* implementation of standard OAuth with Linkedin as the service provider.
*
* @package Kohana/OAuth
* @category Provider
* @author Kohana Team
* @copyright (c) 2010 Kohana Team
* @license http://kohanaframework.org/license
* @author Deon George
* @copyright (c) 2009-2013 Deon George
* @license http://dev.leenooks.net/license.html
* @since 3.0.7
*/
class Kohana_OAuth_Provider_Linkedin extends OAuth_Provider {
/**
* @var string Provider name
*/
public $name = 'linkedin';
/**
* @var string Signature
*/
protected $signature = 'HMAC-SHA1';
/**
* @var string Our API Items that we want to access
*/
protected $scope = 'r_basicprofile+r_emailaddress';
/**
* Request token URL
*
* @return string
*/
public function url_request_token()
{
return 'https://api.linkedin.com/uas/oauth/requestToken';
}
/**
* Authorize URL
*
* @return string
*/
public function url_authorize()
{
return 'https://api.linkedin.com/uas/oauth/authorize';
}
/**
* Access token URL
*
* @return string
*/
public function url_access_token()
{
return 'https://api.linkedin.com/uas/oauth/accessToken';
}
/**
* Access to Profile Details URL
*
* @return string
*/
public function url_user_details()
{
return 'https://api.linkedin.com/v1/people/~:(id,first-name,last-name,email-address)?format=json';
}
} // End Kohana_OAuth_Provider_Linkedin