@@ -47,10 +47,10 @@ def __init__(
47
47
delete_UMAresource : Callable = None ,
48
48
)-> Dialog :
49
49
"""init for `EditClientDialog`, inherits from two diffrent classes `JansGDialog` and `DialogUtils`
50
-
50
+
51
51
JansGDialog (dialog): This is the main dialog Class Widget for all Jans-cli-tui dialogs except custom dialogs like dialogs with navbar
52
52
DialogUtils (methods): Responsable for all `make data from dialog` and `check required fields` in the form for any Edit or Add New
53
-
53
+
54
54
Args:
55
55
parent (widget): This is the parent widget for the dialog, to access `Pageup` and `Pagedown`
56
56
title (str): The Main dialog title
@@ -100,7 +100,7 @@ def save(self) -> None:
100
100
self .data ['attributes' ]= {'parLifetime' :self .data ['parLifetime' ]}
101
101
self .data ['attributes' ]= {'requirePar' :self .data ['requirePar' ]}
102
102
for list_key in (
103
-
103
+
104
104
'backchannelLogoutUri' ,
105
105
'additionalAudience' ,
106
106
'rptClaimsScripts' ,
@@ -113,7 +113,7 @@ def save(self) -> None:
113
113
'introspectionScripts' ,
114
114
'ropcScripts' ,
115
115
'consentGatheringScripts' ,
116
-
116
+
117
117
):
118
118
if self .data [list_key ]:
119
119
self .data ['attributes' ][list_key ] = self .data [list_key ].splitlines ()
@@ -190,21 +190,21 @@ def prepare_tabs(self) -> None:
190
190
_ ("Active" ),
191
191
name = 'disabled' ,
192
192
checked = not self .data .get ('disabled' ),
193
- jans_help = self .myparent .get_help_from_schema (schema , 'disabled' ),
193
+ jans_help = self .myparent .get_help_from_schema (schema , 'disabled' ),
194
194
style = 'class:outh-client-checkbox' ),
195
195
196
196
self .myparent .getTitledText (
197
197
_ ("Client Name" ),
198
- name = 'displayName ' ,
199
- value = self .data .get ('displayName ' ,'' ),
200
- jans_help = self .myparent .get_help_from_schema (schema , 'displayName ' ),
198
+ name = 'clientName ' ,
199
+ value = self .data .get ('clientName ' ,'' ),
200
+ jans_help = self .myparent .get_help_from_schema (schema , 'clientName ' ),
201
201
style = 'class:outh-client-text' ),
202
202
203
203
self .myparent .getTitledText (
204
204
_ ("Client Secret" ),
205
205
name = 'clientSecret' ,
206
206
value = self .data .get ('clientSecret' ,'' ),
207
- jans_help = self .myparent .get_help_from_schema (schema , 'clientSecret' ),
207
+ jans_help = self .myparent .get_help_from_schema (schema , 'clientSecret' ),
208
208
style = 'class:outh-client-text' ),
209
209
210
210
self .myparent .getTitledText (
@@ -213,7 +213,7 @@ def prepare_tabs(self) -> None:
213
213
value = self .data .get ('description' ,'' ),
214
214
jans_help = self .myparent .get_help_from_schema (schema , 'description' ),
215
215
style = 'class:outh-client-text' ),
216
-
216
+
217
217
self .myparent .getTitledRadioButton (
218
218
_ ("Authn Method token endpoint" ),
219
219
name = 'tokenEndpointAuthMethod' ,
@@ -236,7 +236,7 @@ def prepare_tabs(self) -> None:
236
236
value = self .data .get ('sectorIdentifierUri' ,'' ),
237
237
jans_help = self .myparent .get_help_from_schema (schema , 'sectorIdentifierUri' ),
238
238
style = 'class:outh-client-text' ),
239
-
239
+
240
240
self .myparent .getTitledCheckBoxList (
241
241
_ ("Grant" ),
242
242
name = 'grantTypes' ,
@@ -268,7 +268,7 @@ def prepare_tabs(self) -> None:
268
268
current_value = self .data .get ('applicationType' ),
269
269
jans_help = self .myparent .get_help_from_schema (schema , 'applicationType' ),
270
270
style = 'class:outh-client-radiobutton' ),
271
-
271
+
272
272
self .myparent .getTitledText (
273
273
_ ("Redirect Uris" ),
274
274
name = 'redirectUris' ,
@@ -366,7 +366,7 @@ def prepare_tabs(self) -> None:
366
366
],width = D (),style = 'class:outh-client-tabs' )
367
367
368
368
self .tabs ['Logout' ] = HSplit ([
369
-
369
+
370
370
self .myparent .getTitledText (
371
371
_ ("Front channel logout URI" ),
372
372
name = 'frontChannelLogoutUri' ,
@@ -390,7 +390,7 @@ def prepare_tabs(self) -> None:
390
390
'backchannelLogoutUri' ),
391
391
height = 3 , style = 'class:outh-client-text'
392
392
),
393
-
393
+
394
394
self .myparent .getTitledCheckBox (
395
395
_ ("Back channel logout session required" ),
396
396
name = 'backchannelLogoutSessionRequired' ,
@@ -447,7 +447,7 @@ def prepare_tabs(self) -> None:
447
447
value = self .data .get ('softwareStatement' ,'' ),
448
448
jans_help = self .myparent .get_help_from_schema (schema , 'softwareStatement' ),
449
449
style = 'class:outh-client-text' ),
450
-
450
+
451
451
],width = D (),style = 'class:outh-client-tabs' )
452
452
453
453
@@ -456,7 +456,7 @@ def prepare_tabs(self) -> None:
456
456
VSplit ([
457
457
self .myparent .getButton (text = _ ("Get Resources" ), name = 'oauth:Resources:get' , jans_help = _ ("Retreive UMA Resources" ), handler = self .oauth_get_uma_resources ),
458
458
self .myparent .getTitledText (_ ("Search" ), name = 'oauth:Resources:search' , jans_help = _ ("Press enter to perform search" ), accept_handler = self .search_uma_resources ,style = 'class:outh-client-textsearch' ),
459
-
459
+
460
460
],
461
461
padding = 3 ,
462
462
width = D (),
@@ -630,7 +630,7 @@ def allow_spontaneous_changed(cb):
630
630
631
631
style = 'class:outh-client-checkbox'
632
632
),
633
-
633
+
634
634
self .myparent .getTitledCheckBox (
635
635
_ ("Persist Authorizations" ),
636
636
name = 'persistClientAuthorizations' ,
@@ -764,7 +764,7 @@ def allow_spontaneous_changed(cb):
764
764
self .myparent .cli_object .get_schema_from_reference ('' , '#/components/schemas/ClientAttributes' ),
765
765
'ropcScripts' ),
766
766
),
767
-
767
+
768
768
self .myparent .getTitledText (_ ("OAuth Consent" ),
769
769
name = 'consentGatheringScripts' ,
770
770
value = '\n ' .join (self .data .get ('attributes' , {}).get ('consentGatheringScripts' ,[]) ),
@@ -859,8 +859,7 @@ def oauth_update_uma_resources (
859
859
endpoint_args = 'limit:10'
860
860
if pattern :
861
861
endpoint_args += ',pattern:' + pattern
862
-
863
-
862
+
864
863
self .myparent .logger .debug ('DATA endpoint_args: ' + str (endpoint_args ))
865
864
try :
866
865
rsponse = self .myparent .cli_object .process_command_by_id (
@@ -890,7 +889,7 @@ def oauth_update_uma_resources (
890
889
for d in result :
891
890
scopes_of_resource = []
892
891
for scope_dn in d .get ('scopes' , []):
893
-
892
+
894
893
inum = scope_dn .split (',' )[0 ].split ('=' )[1 ]
895
894
scope_result = {}
896
895
try :
@@ -906,7 +905,7 @@ def oauth_update_uma_resources (
906
905
display_name = 'None'
907
906
pass
908
907
display_name = scope_result .get ('displayName' ) or scope_result .get ('inum' )
909
-
908
+
910
909
if display_name :
911
910
scopes_of_resource .append (display_name )
912
911
else :
@@ -959,13 +958,13 @@ def client_dialog_nav_selection_changed(
959
958
960
959
def view_uma_resources (self , ** params : Any ) -> None :
961
960
"""This method view the UMA resources in a dialog
962
- """
961
+ """
963
962
964
963
selected_line_data = params ['data' ] ##self.uma_result
965
964
title = _ ("Edit user Data (Clients)" )
966
965
967
966
dialog = ViewUMADialog (self .myparent , title = title , data = selected_line_data , deleted_uma = self .delete_UMAresource )
968
-
967
+
969
968
self .myparent .show_jans_dialog (dialog )
970
969
971
970
def __pt_container__ (self )-> Dialog :
0 commit comments