Completed
Push — master ( e6cd79...15515b )
by Mike
02:12
created

Oauth2Token::data()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace SugarAPI\SDK\EntryPoint\POST;
4
5
use SugarAPI\SDK\EntryPoint\Abstracts\POST\JSONEntryPoint as POSTEntryPoint;
6
7
class Oauth2Token extends POSTEntryPoint {
8
9
    protected $_AUTH_REQUIRED = false;
10
    protected $_URL = 'oauth2/token';
11
    protected $_REQUIRED_DATA = array(
12
        'username',
13
        'password',
14
        'grant_type',
15
        'client_id',
16
        'client_secret',
17
        'platform'
18
    );
19
20
    public function data(array $data){
21
        $data['grant_type'] = 'password';
22
        return parent::data($data);
23
    }
24
25
26
}