@@ -24,107 +24,111 @@ class UpsertProvider extends Base {
2424
2525 private const EXTRA_OPTIONS = [
2626 'unique-uid ' => [
27- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , ' default ' => null , 'setting_key ' => ProviderService::SETTING_UNIQUE_UID ,
28- 'description ' => 'Flag if unique user ids shall be used or not. 1 to enable (default) , 0 to disable ' ,
27+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_UNIQUE_UID ,
28+ 'description ' => 'Determines if unique user ids shall be used or not. 1 to enable, 0 to disable ' ,
2929 ],
3030 'check-bearer ' => [
31- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , 'default ' => null , 'setting_key ' => ProviderService::SETTING_CHECK_BEARER ,
32- 'description ' => 'Flag if Nextcloud API/WebDav calls should check the Bearer token against this provider or not. 1 to enable (default), 0 to disable ' ,
31+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_CHECK_BEARER ,
32+ 'description ' => 'Determines if Nextcloud API/WebDav calls should check the Bearer token against this provider or not. 1 to enable, 0 to disable (default when creating a new provider) ' ,
33+ ],
34+ 'bearer-provisioning ' => [
35+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_BEARER_PROVISIONING ,
36+ 'description ' => 'Determines if Nextcloud API/WebDav calls should automatically provision the user, when sending API and WebDav Requests with a Bearer token. 1 to enable, 0 to disable (default when creating a new provider) ' ,
3337 ],
3438 'send-id-token-hint ' => [
35- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , ' default ' => null , 'setting_key ' => ProviderService::SETTING_SEND_ID_TOKEN_HINT ,
36- 'description ' => 'Flag if ID token should be included as a parameter to the end_session_endpoint URL when using unified logout. 1 to enable (default) , 0 to disable ' ,
39+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_SEND_ID_TOKEN_HINT ,
40+ 'description ' => 'Determines if ID token should be included as a parameter to the end_session_endpoint URL when using unified logout. 1 to enable, 0 to disable ' ,
3741 ],
3842 'mapping-display-name ' => [
39- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , ' default ' => null , 'setting_key ' => ProviderService::SETTING_MAPPING_DISPLAYNAME ,
43+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_MAPPING_DISPLAYNAME ,
4044 'description ' => 'Attribute mapping of the display name ' ,
4145 ],
4246 'mapping-email ' => [
43- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , ' default ' => null , 'setting_key ' => ProviderService::SETTING_MAPPING_EMAIL ,
47+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_MAPPING_EMAIL ,
4448 'description ' => 'Attribute mapping of the email address ' ,
4549 ],
4650 'mapping-quota ' => [
47- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , ' default ' => null , 'setting_key ' => ProviderService::SETTING_MAPPING_QUOTA ,
51+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_MAPPING_QUOTA ,
4852 'description ' => 'Attribute mapping of the quota ' ,
4953 ],
5054 'mapping-uid ' => [
51- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , ' default ' => null , 'setting_key ' => ProviderService::SETTING_MAPPING_UID ,
55+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_MAPPING_UID ,
5256 'description ' => 'Attribute mapping of the user id ' ,
5357 ],
5458 'extra-claims ' => [
55- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , ' default ' => null , 'setting_key ' => ProviderService::SETTING_EXTRA_CLAIMS ,
59+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_EXTRA_CLAIMS ,
5660 'description ' => 'Extra claims to request when getting tokens ' ,
5761 ],
5862 'mapping-website ' => [
59- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , ' default ' => null , 'setting_key ' => ProviderService::SETTING_MAPPING_WEBSITE ,
63+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_MAPPING_WEBSITE ,
6064 'description ' => 'Attribute mapping of the website ' ,
6165 ],
6266 'mapping-avatar ' => [
63- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , ' default ' => null , 'setting_key ' => ProviderService::SETTING_MAPPING_AVATAR ,
67+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_MAPPING_AVATAR ,
6468 'description ' => 'Attribute mapping of the avatar ' ,
6569 ],
6670 'mapping-twitter ' => [
67- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , ' default ' => null , 'setting_key ' => ProviderService::SETTING_MAPPING_TWITTER ,
71+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_MAPPING_TWITTER ,
6872 'description ' => 'Attribute mapping of twitter ' ,
6973 ],
7074 'mapping-fediverse ' => [
71- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , ' default ' => null , 'setting_key ' => ProviderService::SETTING_MAPPING_FEDIVERSE ,
75+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_MAPPING_FEDIVERSE ,
7276 'description ' => 'Attribute mapping of the fediverse ' ,
7377 ],
7478 'mapping-organisation ' => [
75- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , ' default ' => null , 'setting_key ' => ProviderService::SETTING_MAPPING_ORGANISATION ,
79+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_MAPPING_ORGANISATION ,
7680 'description ' => 'Attribute mapping of the organisation ' ,
7781 ],
7882 'mapping-role ' => [
79- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , ' default ' => null , 'setting_key ' => ProviderService::SETTING_MAPPING_ROLE ,
83+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_MAPPING_ROLE ,
8084 'description ' => 'Attribute mapping of the role ' ,
8185 ],
8286 'mapping-headline ' => [
83- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , ' default ' => null , 'setting_key ' => ProviderService::SETTING_MAPPING_HEADLINE ,
87+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_MAPPING_HEADLINE ,
8488 'description ' => 'Attribute mapping of the headline ' ,
8589 ],
8690 'mapping-biography ' => [
87- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , ' default ' => null , 'setting_key ' => ProviderService::SETTING_MAPPING_BIOGRAPHY ,
91+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_MAPPING_BIOGRAPHY ,
8892 'description ' => 'Attribute mapping of the biography ' ,
8993 ],
9094 'mapping-phone ' => [
91- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , ' default ' => null , 'setting_key ' => ProviderService::SETTING_MAPPING_PHONE ,
95+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_MAPPING_PHONE ,
9296 'description ' => 'Attribute mapping of the phone ' ,
9397 ],
9498 'mapping-gender ' => [
95- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , ' default ' => null , 'setting_key ' => ProviderService::SETTING_MAPPING_GENDER ,
99+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_MAPPING_GENDER ,
96100 'description ' => 'Attribute mapping of the gender ' ,
97101 ],
98102 'mapping-address ' => [
99- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , ' default ' => null , 'setting_key ' => ProviderService::SETTING_MAPPING_ADDRESS ,
103+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_MAPPING_ADDRESS ,
100104 'description ' => 'Attribute mapping of the address ' ,
101105 ],
102106 'mapping-street_address ' => [
103- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , ' default ' => null , 'setting_key ' => ProviderService::SETTING_MAPPING_STREETADDRESS ,
107+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_MAPPING_STREETADDRESS ,
104108 'description ' => 'Attribute mapping of the street address ' ,
105109 ],
106110 'mapping-postal_code ' => [
107- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , ' default ' => null , 'setting_key ' => ProviderService::SETTING_MAPPING_POSTALCODE ,
111+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_MAPPING_POSTALCODE ,
108112 'description ' => 'Attribute mapping of the postal code ' ,
109113 ],
110114 'mapping-locality ' => [
111- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , ' default ' => null , 'setting_key ' => ProviderService::SETTING_MAPPING_LOCALITY ,
115+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_MAPPING_LOCALITY ,
112116 'description ' => 'Attribute mapping of the locality ' ,
113117 ],
114118 'mapping-region ' => [
115- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , ' default ' => null , 'setting_key ' => ProviderService::SETTING_MAPPING_REGION ,
119+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_MAPPING_REGION ,
116120 'description ' => 'Attribute mapping of the region ' ,
117121 ],
118122 'mapping-country ' => [
119- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , ' default ' => null , 'setting_key ' => ProviderService::SETTING_MAPPING_COUNTRY ,
123+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_MAPPING_COUNTRY ,
120124 'description ' => 'Attribute mapping of the country ' ,
121125 ],
122126 'group-provisioning ' => [
123- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , ' default ' => null , 'setting_key ' => ProviderService::SETTING_GROUP_PROVISIONING ,
127+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_GROUP_PROVISIONING ,
124128 'description ' => 'Flag to toggle group provisioning. 1 to enable, 0 to disable (default) ' ,
125129 ],
126130 'mapping-groups ' => [
127- 'shortcut ' => null , 'mode ' => InputOption::VALUE_OPTIONAL , ' default ' => null , 'setting_key ' => ProviderService::SETTING_MAPPING_GROUPS ,
131+ 'shortcut ' => null , 'mode ' => InputOption::VALUE_REQUIRED , 'setting_key ' => ProviderService::SETTING_MAPPING_GROUPS ,
128132 'description ' => 'Attribute mapping of the groups ' ,
129133 ],
130134 ];
@@ -148,7 +152,7 @@ protected function configure() {
148152 ->addOption ('endsessionendpointuri ' , 'e ' , InputOption::VALUE_OPTIONAL , 'OpenID end session endpoint uri ' )
149153 ->addOption ('scope ' , 'o ' , InputOption::VALUE_OPTIONAL , 'OpenID requested value scopes, if not set defaults to "openid email profile" ' );
150154 foreach (self ::EXTRA_OPTIONS as $ name => $ option ) {
151- $ this ->addOption ($ name , $ option ['shortcut ' ], $ option ['mode ' ], $ option ['description ' ], $ option [ ' default ' ] );
155+ $ this ->addOption ($ name , $ option ['shortcut ' ], $ option ['mode ' ], $ option ['description ' ]);
152156 }
153157 parent ::configure ();
154158 }
0 commit comments