@@ -81,14 +81,15 @@ def _build_client(self, client_credential, authority):
8181 audience = authority .token_endpoint , issuer = self .client_id )
8282 else :
8383 default_body ['client_secret' ] = client_credential
84+ server_configuration = {
85+ "authorization_endpoint" : authority .authorization_endpoint ,
86+ "token_endpoint" : authority .token_endpoint ,
87+ "device_authorization_endpoint" :
88+ urljoin (authority .token_endpoint , "devicecode" ),
89+ }
8490 return Client (
91+ server_configuration ,
8592 self .client_id ,
86- configuration = {
87- "authorization_endpoint" : authority .authorization_endpoint ,
88- "token_endpoint" : authority .token_endpoint ,
89- "device_authorization_endpoint" : urljoin (
90- authority .token_endpoint , "devicecode" ),
91- },
9293 default_body = default_body ,
9394 client_assertion = client_assertion ,
9495 on_obtaining_tokens = self .token_cache .add ,
@@ -121,8 +122,8 @@ def get_authorization_request_url(
121122 """
122123 the_authority = Authority (authority ) if authority else self .authority
123124 client = Client (
124- self . client_id , configuration = {
125- "authorization_endpoint" : the_authority . authorization_endpoint } )
125+ { "authorization_endpoint" : the_authority . authorization_endpoint },
126+ self . client_id )
126127 return client .build_auth_request_uri (
127128 response_type = "code" , # Using Authorization Code grant
128129 redirect_uri = redirect_uri , state = state , login_hint = login_hint ,
0 commit comments