~fkooman/vpn-user-portal

ref: v3 vpn-user-portal/src/OAuth/ClientDb.php -rw-r--r-- 3.4 KiB
a63b4ff6François Kooman add script to test the statistics 3 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?php

declare(strict_types=1);

/*
 * eduVPN - End-user friendly VPN.
 *
 * Copyright: 2016-2022, The Commons Conservancy eduVPN Programme
 * SPDX-License-Identifier: AGPL-3.0+
 */

namespace Vpn\Portal\OAuth;

use fkooman\OAuth\Server\ClientInfo;
use fkooman\OAuth\Server\SimpleClientDb;

class ClientDb extends SimpleClientDb
{
    public function __construct()
    {
        $this->add(
            new ClientInfo(
                'org.eduvpn.app.windows',
                ['http://127.0.0.1:{PORT}/callback', 'http://[::1]:{PORT}/callback'],
                null,
                'eduVPN for Windows',
                true
            )
        );
        $this->add(
            new ClientInfo(
                'org.letsconnect-vpn.app.windows',
                ['http://127.0.0.1:{PORT}/callback', 'http://[::1]:{PORT}/callback'],
                null,
                'Let\'s Connect! for Windows',
                true
            )
        );
        $this->add(
            new ClientInfo(
                'org.eduvpn.app.android',
                ['org.eduvpn.app:/api/callback', 'https://android.app.eduvpn.org/api/callback'],
                null,
                'eduVPN for Android',
                true
            )
        );
        $this->add(
            new ClientInfo(
                'org.letsconnect-vpn.app.android',
                ['org.letsconnect-vpn.app:/api/callback', 'https://android.app.letsconnect-vpn.org/api/callback'],
                null,
                'Let\'s Connect! for Android',
                true
            )
        );
        $this->add(
            new ClientInfo(
                'org.eduvpn.app.ios',
                ['org.eduvpn.app.ios:/api/callback', 'https://ios.app.eduvpn.org/auth/app/redirect/'],
                null,
                'eduVPN for iOS',
                true
            )
        );
        $this->add(
            new ClientInfo(
                'org.letsconnect-vpn.app.ios',
                ['org.letsconnect-vpn.app.ios:/api/callback'],
                null,
                'Let\'s Connect! for iOS',
                true
            )
        );
        $this->add(
            new ClientInfo(
                'org.eduvpn.app.macos',
                ['org.eduvpn.app:/api/callback', 'http://127.0.0.1:{PORT}/callback', 'http://[::1]:{PORT}/callback'],
                null,
                'eduVPN for macOS',
                true
            )
        );
        $this->add(
            new ClientInfo(
                'org.letsconnect-vpn.app.macos',
                ['org.letsconnect-vpn.app:/api/callback', 'http://127.0.0.1:{PORT}/callback', 'http://[::1]:{PORT}/callback'],
                null,
                'Let\'s Connect! for macOS',
                true
            )
        );
        $this->add(
            new ClientInfo(
                'org.eduvpn.app.linux',
                ['org.eduvpn.app:/api/callback', 'http://127.0.0.1:{PORT}/callback', 'http://[::1]:{PORT}/callback'],
                null,
                'eduVPN for Linux',
                true
            )
        );
        $this->add(
            new ClientInfo(
                'org.letsconnect-vpn.app.linux',
                ['org.letsconnect-vpn.app:/api/callback', 'http://127.0.0.1:{PORT}/callback', 'http://[::1]:{PORT}/callback'],
                null,
                'Let\'s Connect! for Linux',
                true
            )
        );
    }
}