Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
10582 lgm 1
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2
/**
3
 * Mailchimp OAuth2 Provider
4
 *
5
 * @package    CodeIgniter/OAuth2
6
 * @category   Provider
7
 * @author     Phil Sturgeon
8
 * @copyright  (c) 2012 HappyNinjas Ltd
9
 * @license    http://philsturgeon.co.uk/code/dbad-license
10
 */
11
 
12
class OAuth2_Provider_Mailchimp extends OAuth2_Provider
13
{
14
	/**
15
	 * @var  string  the method to use when requesting tokens
16
	 */
17
	protected $method = 'POST';
18
 
19
	public function url_authorize()
20
	{
21
		return 'https://login.mailchimp.com/oauth2/authorize';
22
	}
23
 
24
	public function url_access_token()
25
	{
26
		return 'https://login.mailchimp.com/oauth2/token';
27
	}
28
 
29
	public function get_user_info(OAuth2_Token_Access $token)
30
	{
31
		// Create a response from the request
32
		return array(
33
			'uid' => $token->access_token,
34
		);
35
	}
36
}