Completed
Pull Request — master (#1275)
by
unknown
03:05
created

AccessToken   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 28
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getCredentials() 0 5 1
1
<?php
2
/*
3
 * This file is part of the keacefull/wechat.
4
 *
5
 * (c) xiaomin <[email protected]>
6
 *
7
 * This source file is subject to the MIT license that is bundled
8
 * with this source code in the file LICENSE.
9
 */
10
namespace EasyWeChat\OpenWork\Auth;
11
12
use  EasyWeChat\Kernel\AccessToken as BaseAccessToken;
0 ignored issues
show
Coding Style introduced by
There must be a single space after the USE keyword
Loading history...
13
14
15
class AccessToken extends BaseAccessToken
16
{
17
18
    /**
19
     * @var string
20
     */
21
    protected $endpointToGetToken = 'cgi-bin/service/get_provider_token';
22
23
    /**
24
     * @var string
25
     */
26
    protected $tokenKey = 'provider_access_token';
27
28
    /**
29
     * @var string
30
     */
31
    protected $cachePrefix = 'easywechat.kernel.provider_access_token.';
32
33
    /**
34
     * Credential for get token.
35
     *
36
     * @return array
37
     */
38
    protected function getCredentials(): array
39
    {
40
        return [
41
            'corpid'          => $this->app['config']['corp_id'], //服务商的corpid
42
            'provider_secret' => $this->app['config']['secret'],
43
        ];
44
    }
45
}