update hydra api

This commit is contained in:
TuxCoder 2023-01-13 17:08:27 +01:00
parent cfb40edc89
commit deb73d06e6
2 changed files with 7 additions and 4 deletions

View file

@ -37,16 +37,17 @@ class OAuth2ClientForm(FlaskForm):
client_id = StringField(gettext('client_id') ) client_id = StringField(gettext('client_id') )
client_name = StringField(gettext('client_name')) client_name = StringField(gettext('client_name'))
client_uri = URLField(gettext('client_uri')) client_uri = URLField(gettext('client_uri'))
token_endpoint_auth_method = SelectField('token_endpoint_auth_method', choices=[(x, x) for x in ['client_secret_basic', 'client_secret_post', 'private_key_jwt', 'none']])
client_secret = PasswordField(gettext('client_secret')) client_secret = PasswordField(gettext('client_secret'))
logo_uri = URLField(gettext('logo_uri')) logo_uri = URLField(gettext('logo_uri'))
redirect_uris = FieldList(URLField(gettext('redirect_uri')), min_entries=1) redirect_uris = FieldList(URLField(gettext('redirect_uri')), min_entries=1)
contacts = FieldList(StringField('contacts')) contacts = FieldList(StringField('contacts'))
grant_types = SelectMultipleField('grant_types',choices=[(x, x) for x in ['authorization_code', 'refresh_token', 'implicit']]) grant_types = SelectMultipleField('grant_types',choices=[(x, x) for x in ['authorization_code', 'refresh_token', 'implicit', 'urn:ietf:params:oauth:grant-type:jwt-bearer']])
response_types = SelectMultipleField('repsonse_type',choices=[(x, x) for x in ['code token', 'code', 'id_token']]) response_types = SelectMultipleField('repsonse_type',choices=[(x, x) for x in ['code', 'token', 'id_token']])
scope = StringField(gettext('scope')) scope = StringField(gettext('scope'))
subject_type = StringField(gettext('subject_type')) subject_type = StringField(gettext('subject_type'))
token_endpoint_auth_method = SelectField('token_endpoint_auth_method', choices=[(x, x) for x in ['client_secret_basic', 'client_secret_post']]) userinfo_signed_response_alg = SelectField(gettext('userinfo_signed_response_alg'), choices=[(x, x) for x in ['none', 'RS256']])
userinfo_signed_response_alg = StringField(gettext('userinfo_signed_response_alg')) allowed_cors_origins = FieldList(StringField('allowed_cors_origins'))
client_secret_expires_at = IntegerField('client_secret_expires_at') client_secret_expires_at = IntegerField('client_secret_expires_at')

View file

@ -69,6 +69,8 @@ async def consent() -> ResponseReturnValue:
'username': str(user.username), 'username': str(user.username),
'email': str(user.email), 'email': str(user.email),
'email_verified': True, 'email_verified': True,
#'given_name': str(user.username),
#'family_name': '-',
'groups': [group.name for group in user.groups] 'groups': [group.name for group in user.groups]
} }
id_token_data = {} id_token_data = {}