27
27
* class that manges settings for client for this IdP.
28
28
*/
29
29
class client {
30
- /**@var int id primary for this client in the database */
30
+ /** @var int $ id primary for this client in the database */
31
31
public int $ id ; // Has to be pulic now because the way its send to database in update.
32
32
33
- /**@var string $clientid name of the client */
33
+ /** @var string $clientid name of the client */
34
34
public string $ clientid ;
35
- /**@var string $clientsecret password of this client*/
35
+
36
+ /** @var string $clientsecret password of this client*/
36
37
public string $ clientsecret ;
37
- /**@var string $redirecturi addres of the clinet to send user to after identification*/
38
+
39
+ /** @var string $redirecturi addres of the clinet to send user to after identification*/
38
40
public string $ redirecturi ;
39
- /**@var array $granttypes types of oauth flows server will accept for this client*/
41
+
42
+ /** @var array $granttypes types of oauth flows server will accept for this client*/
40
43
public array $ granttypes ;
41
- /**@var array $scopes the client is allowed to request, which in our case are the claims*/
44
+
45
+ /** @var array $scope the client is allowed to request, which in our case are the claims*/
42
46
public array $ scope ;
43
- /**@var int $userid if client grantype used is client_authenticat. which user the client inperonates */
47
+
48
+ /** @var int $userid if client grantype used is client_authenticat. which user the client inperonates */
44
49
public int $ userid ;
45
- /**@var int $noconfirmation if user is asked to confirm that client is allowed to get this information of the user*/
50
+
51
+ /** @var int $noconfirmation if user is asked to confirm that client is allowed to get this information of the user*/
46
52
public int $ noconfirmation ;
47
53
48
54
/**
49
55
* Initialze the client class.
56
+ * @param int $clientid
57
+ * @param string $redirecturi
58
+ * @param array $granttypes
59
+ * @param array $scope
60
+ * @param int $userid
61
+ * @param bool $noconfirmation
50
62
*/
51
63
public function __construct ($ clientid , $ redirecturi , $ granttypes , $ scope , $ userid , $ noconfirmation ) {
52
64
$ this ->clientid = $ clientid ;
@@ -71,6 +83,8 @@ public function id() {
71
83
// TODO Use $storage->getClientDetails instead .
72
84
/**
73
85
* Get client by client id from database.
86
+ *
87
+ * @param int $id clientid
74
88
*/
75
89
public static function get_client_by_id ($ id ) {
76
90
global $ DB ;
@@ -130,6 +144,8 @@ public function delete() {
130
144
131
145
/**
132
146
* Generate public private key pair
147
+ *
148
+ * @param int $clientid
133
149
*/
134
150
public static function generate_key_pair ($ clientid ) {
135
151
global $ DB ;
0 commit comments