Skip to content

Commit

Permalink
feat(jans-cli-tui): JWT Response for OAuth Token Introspection (#6574)
Browse files Browse the repository at this point in the history
* feat(jans-cli-tui): JWT Response for OAuth Token Introspection

* chore: introspection script should not be cometted in this PR
  • Loading branch information
devrimyatar committed Nov 17, 2023
1 parent 65bc044 commit aef08c1
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions jans-cli-tui/cli_tui/plugins/010_auth_server/edit_client_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
ERROR_GETTING_CLIENTS = _("Error getting clients")
ATTRIBUTE_SCHEMA_PATH = '#/components/schemas/ClientAttributes'
URL_SUFFIX_FORMATTER = 'inum:{}'

INTROSPECTION_ALG_PROPERTIES = ('introspectionSignedResponseAlg', 'introspectionEncryptedResponseAlg', 'introspectionEncryptedResponseEnc')

class EditClientDialog(JansGDialog, DialogUtils):
"""The Main Client Dialog that contain every thing related to The Client
Expand Down Expand Up @@ -157,6 +157,10 @@ def save(self) -> None:
self.data['displayName'] = self.data['clientName']
self.data['attributes']['jansAuthorizedAcr'] = self.data.pop('jansAuthorizedAcr')

for intro_attr in INTROSPECTION_ALG_PROPERTIES:
if intro_attr in self.data:
self.data['attributes'][intro_attr] = self.data.pop(intro_attr)

cfr = self.check_required_fields()

if not cfr:
Expand Down Expand Up @@ -748,19 +752,29 @@ def change_view_hide(me):
'request_object_encryption_alg_values_supported'),
(_("Request Object Enc for Encryption"), 'requestObjectEncryptionEnc',
'request_object_encryption_enc_values_supported'),

(_("Introspection Signed Response Alg "), 'introspectionSignedResponseAlg',
'id_token_signing_alg_values_supported'),
(_("Introspection Encrypted Response Alg"), 'introspectionEncryptedResponseAlg',
'id_token_encryption_alg_values_supported'),
(_("Introspection Encrypted Response Enc"), 'introspectionEncryptedResponseEnc',
'id_token_encryption_enc_values_supported'),

):

self.drop_down_select_first.append(swagger_key)

values = [(alg, alg) for alg in self.myparent.cli_object.openid_configuration.get(
openid_key, [])]

value = self.data.get('attributes', {}).get(swagger_key) if swagger_key in INTROSPECTION_ALG_PROPERTIES else self.data.get(swagger_key)

encryption_signing.append(self.myparent.getTitledWidget(
title,
name=swagger_key,
widget=DropDownWidget(
values=values,
value=self.data.get(swagger_key)
value=value
),
jans_help=self.myparent.get_help_from_schema(
schema, swagger_key),
Expand Down

0 comments on commit aef08c1

Please sign in to comment.