Skip to content

Commit 1ac4cf6

Browse files
committed
Fix OAuth2Token._expired private function
1 parent 2504e3e commit 1ac4cf6

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

Project/Sources/Classes/OAuth2Token.4dm

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,10 @@ Function _loadFromObject($inObject : Object)
2525

2626
If (($inObject#Null) && (Not(OB Is empty($inObject))))
2727

28-
This.token:={}
2928
If (OB Get type($inObject; "token")=Is object)
30-
31-
var $i : Integer
32-
var $keys : Collection:=OB Keys($inObject.token)
33-
var $values : Collection:=OB Values($inObject.token)
34-
29+
This.token:=OB Copy($inObject.token)
30+
Else
3531
This.token:={}
36-
For ($i; 0; $keys.length-1)
37-
This.token[$keys[$i]]:=$values[$i]
38-
End for
3932
End if
4033

4134
If (OB Is defined($inObject; "tokenExpiration") && ($inObject.tokenExpiration#Null))
@@ -98,7 +91,7 @@ Function _Expired($inParams : Text) : Boolean
9891
: (Current date<Date($expiration))
9992
$result:=False
10093
: ((Current date=Date($expiration)) && \
101-
((Current time+0)<(Time($expiration)+0)))
94+
((Current time+0)<(Time($expiration)-10)))
10295
$result:=False
10396
End case
10497
End if

0 commit comments

Comments
 (0)