fix command add contract oidc

This commit is contained in:
Cayo Puigdefabregas 2023-09-21 13:19:30 +02:00
parent 5069c793cf
commit 8a7a9476fe
1 changed files with 14 additions and 15 deletions

View File

@ -25,8 +25,8 @@ class AddContractOidc:
@click.argument('client_uri')
@click.argument('scope', required=False, default="openid profile rols")
@click.argument('redirect_uris', required=False)
@click.argument('grant_types', required=False, default="authorization_code")
@click.argument('response_types', required=False, default="code")
@click.argument('grant_types', required=False, default=["authorization_code"])
@click.argument('response_types', required=False, default=["code"])
@click.argument('token_endpoint_auth_method', required=False, default="client_secret_basic")
def run(
self,
@ -39,18 +39,17 @@ class AddContractOidc:
response_types,
token_endpoint_auth_method):
self.email = email,
self.client_name = client_name,
self.client_uri = client_uri,
self.scope = scope,
self.redirect_uris = redirect_uris,
self.grant_types = grant_types,
self.response_types = response_types,
self.email = email
self.client_name = client_name
self.client_uri = client_uri
self.scope = scope
self.redirect_uris = redirect_uris
self.grant_types = grant_types
self.response_types = response_types
self.token_endpoint_auth_method = token_endpoint_auth_method
if not self.redirect_uris:
self.redirect_uris = "{}/allow_code".format(client_uri)
self.redirect_uris = ["{}/allow_code".format(client_uri)]
self.member = MemberFederated.query.filter_by(domain=client_uri).first()
self.user = User.query.filter_by(email=email).one()