fix command add contract oidc
This commit is contained in:
parent
5069c793cf
commit
8a7a9476fe
|
@ -25,8 +25,8 @@ class AddContractOidc:
|
||||||
@click.argument('client_uri')
|
@click.argument('client_uri')
|
||||||
@click.argument('scope', required=False, default="openid profile rols")
|
@click.argument('scope', required=False, default="openid profile rols")
|
||||||
@click.argument('redirect_uris', required=False)
|
@click.argument('redirect_uris', required=False)
|
||||||
@click.argument('grant_types', required=False, default="authorization_code")
|
@click.argument('grant_types', required=False, default=["authorization_code"])
|
||||||
@click.argument('response_types', required=False, default="code")
|
@click.argument('response_types', required=False, default=["code"])
|
||||||
@click.argument('token_endpoint_auth_method', required=False, default="client_secret_basic")
|
@click.argument('token_endpoint_auth_method', required=False, default="client_secret_basic")
|
||||||
def run(
|
def run(
|
||||||
self,
|
self,
|
||||||
|
@ -39,18 +39,17 @@ class AddContractOidc:
|
||||||
response_types,
|
response_types,
|
||||||
token_endpoint_auth_method):
|
token_endpoint_auth_method):
|
||||||
|
|
||||||
self.email = email,
|
self.email = email
|
||||||
self.client_name = client_name,
|
self.client_name = client_name
|
||||||
self.client_uri = client_uri,
|
self.client_uri = client_uri
|
||||||
self.scope = scope,
|
self.scope = scope
|
||||||
self.redirect_uris = redirect_uris,
|
self.redirect_uris = redirect_uris
|
||||||
self.grant_types = grant_types,
|
self.grant_types = grant_types
|
||||||
self.response_types = response_types,
|
self.response_types = response_types
|
||||||
self.token_endpoint_auth_method = token_endpoint_auth_method
|
self.token_endpoint_auth_method = token_endpoint_auth_method
|
||||||
|
|
||||||
if not self.redirect_uris:
|
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.member = MemberFederated.query.filter_by(domain=client_uri).first()
|
||||||
self.user = User.query.filter_by(email=email).one()
|
self.user = User.query.filter_by(email=email).one()
|
||||||
|
|
Reference in New Issue