File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 28
28
"daily_load" : {
29
29
"type" : " boolean" ,
30
30
"title" : " Daily load"
31
+ },
32
+ "manual_authentication" : {
33
+ "type" : " boolean" ,
34
+ "title" : " Manual Authentication"
31
35
}
32
36
}
33
37
}
Original file line number Diff line number Diff line change 18
18
KEY_CLIENT_SECRET = '#client_secret'
19
19
ENDPOINTS = 'endpoint'
20
20
DAILY = 'daily_load'
21
+ AUTHENTICATION = 'manual_authentication'
21
22
22
23
CODE_URL = "https://allegro.pl/auth/oauth/device"
23
24
TOKEN_URL = "https://allegro.pl/auth/oauth/token"
@@ -57,9 +58,10 @@ def run(self):
57
58
self .client_secret = params .get (KEY_CLIENT_SECRET )
58
59
self .endpoint = params .get (ENDPOINTS )
59
60
self .daily = params .get (DAILY )
61
+ self .authentication = params .get (AUTHENTICATION )
60
62
61
63
previous_state = self .get_state_file ()
62
- if previous_state . get ( '#refresh_token' ) is None :
64
+ if self . authentication :
63
65
code = self ._get_code ()
64
66
result = json .loads (code .text )
65
67
logging .info ('Manual loggin needed for initial run.' )
You can’t perform that action at this time.
0 commit comments