@@ -30,13 +30,13 @@ def __init__(self):
30
30
self .name = "OK"
31
31
configuration = {
32
32
'issuer' : 'https://cognito-idp.eu-west-1.amazonaws.com/eu-west-1_SLI9qJpc7' ,
33
- 'authorization_endpoint' : 'https://daikin-unicloud-prod.auth.eu-west-1.amazoncognito. com/oauth2 /authorize' ,
33
+ 'authorization_endpoint' : 'https://idp.onecta.daikineurope. com/v1/oidc /authorize' ,
34
34
'userinfo_endpoint' : 'userinfo_endpoint' ,
35
- 'token_endpoint' : 'https://daikin-unicloud-prod.auth.eu-west-1.amazoncognito. com/oauth2 /token' ,
35
+ 'token_endpoint' : 'https://idp.onecta.daikineurope. com/v1/oidc /token' ,
36
36
'token_endpoint_auth_methods_supported' : ['none' ]
37
37
}
38
38
39
- self .openIdClientId = '7rk39602f0ds8lk0h076vvijnb '
39
+ self .openIdClientId = 'emU20GdJDiiUxI_HnFGz69dD '
40
40
self .openIdClient = Client (client_id = self .openIdClientId , config = configuration )
41
41
self .openIdClient .provider_config (configuration ['issuer' ])
42
42
self .openIdStore = {}
@@ -86,7 +86,7 @@ async def doBearerRequest(self, resourceUrl, options=None, refreshed=False):
86
86
87
87
async def refreshAccessToken (self ):
88
88
"""Attempt to refresh the Access Token."""
89
- url = 'https://cognito- idp.eu-west-1.amazonaws .com'
89
+ url = 'https://idp.onecta.daikineurope .com/v1/oidc/token '
90
90
91
91
headers = {
92
92
'Content-Type' : 'application/x-amz-json-1.1' ,
@@ -149,10 +149,10 @@ async def _doAuthorizationRequest(self):
149
149
state = base64 .urlsafe_b64encode (os .urandom (32 )).decode ('utf-8' ).replace ('=' ,'' )
150
150
print ("STATE: {}" .format (state ))
151
151
args = {
152
- 'authorization_endpoint' : 'https://daikin-unicloud-prod.auth.eu-west-1.amazoncognito. com/oauth2 /authorize' ,
152
+ 'authorization_endpoint' : 'https://idp.onecta.daikineurope. com/v1/oidc /authorize' ,
153
153
'userinfo_endpoint' : 'userinfo_endpoint' ,
154
154
'response_type' : ['code' ],
155
- 'scopes' : 'email,openid,profile' ,
155
+ 'scopes' : 'email,openid,profile, ' ,
156
156
}
157
157
158
158
self .openIdClient .redirect_uris = ['daikinunified://login' ]
@@ -172,8 +172,8 @@ async def _doAccessTokenRequest(self, callbackUrl):
172
172
state = self .state
173
173
174
174
args = {
175
- 'authorization_endpoint' : 'https://daikin-unicloud-prod.auth.eu-west-1.amazoncognito. com/oauth2 /authorize' ,
176
- 'token_endpoint' : 'https://daikin-unicloud-prod.auth.eu-west-1.amazoncognito. com/oauth2 /token' ,
175
+ 'authorization_endpoint' : 'https://idp.onecta.daikineurope. com/v1/oidc /authorize' ,
176
+ 'token_endpoint' : 'https://idp.onecta.daikineurope. com/v1/oidc /token' ,
177
177
'token_endpoint_auth_methods_supported' : ['none' ],
178
178
# 'userinfo_endpoint': 'userinfo_endpoint',
179
179
'response_type' : ['code' ],
@@ -461,6 +461,7 @@ async def main():
461
461
user = sys .argv [1 ] if len (sys .argv ) >= 2 else "nousr"
462
462
pwd = sys .argv [2 ] if len (sys .argv ) >= 3 else "nopwd"
463
463
print ("PARAMS: " + user + " " + pwd )
464
+ logging .getLogger ('oci' ).setLevel (logging .DEBUG )
464
465
controller = DaikinCloudController ()
465
466
tokenSet = await controller .retrieveAccessToken (user , pwd )
466
467
devices = await controller .getCloudDevices ()
0 commit comments