99
1010 NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.
1111"""
12- import re
12+
1313from urllib .parse import urlparse , urlunparse
1414
1515from openfga_sdk .exceptions import ApiValueError
@@ -161,7 +161,7 @@ def configuration(self, value):
161161 self ._configuration = value
162162
163163 def _parse_issuer (self , issuer : str ):
164- default_endpoint_path = ' /oauth/token'
164+ default_endpoint_path = " /oauth/token"
165165
166166 parsed_url = urlparse (issuer .strip ())
167167
@@ -176,7 +176,9 @@ def _parse_issuer(self, issuer: str):
176176 if parsed_url .scheme == "" :
177177 parsed_url = urlparse (f"https://{ issuer } " )
178178 elif parsed_url .scheme not in ("http" , "https" ):
179- raise ApiValueError (f"Invalid issuer scheme { parsed_url .scheme } must be HTTP or HTTPS" )
179+ raise ApiValueError (
180+ f"Invalid issuer scheme { parsed_url .scheme } must be HTTP or HTTPS"
181+ )
180182
181183 if parsed_url .path in ("" , "/" ):
182184 parsed_url = parsed_url ._replace (path = default_endpoint_path )
@@ -216,5 +218,4 @@ def validate_credentials_config(self):
216218 )
217219 # validate token issuer
218220
219- parsed_issuer_url = self ._parse_issuer (self .configuration .api_issuer )
220-
221+ self ._parse_issuer (self .configuration .api_issuer )
0 commit comments