Skip to content

Commit 40eb055

Browse files
authored
Merge pull request #2 from pureskillz83/fix/59-brand-identity
feature/versioning
2 parents 4212296 + fb907a0 commit 40eb055

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/Authentication.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,20 @@ private function validateAuthentication($auth = null): bool
137137
'expires_in',
138138
'access_token',
139139
'refresh_token',
140-
'user',
141-
'api_version'
140+
'user'
142141
];
143142

144-
return $auth && array_keys($auth) === $matchingKeys;
143+
if (!$auth) {
144+
return false;
145+
}
146+
147+
foreach ($matchingKeys as $key) {
148+
if (!array_key_exists($key, $auth)) {
149+
return false;
150+
}
151+
}
152+
153+
return true;
145154
}
146155

147156
}

0 commit comments

Comments
 (0)