You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ably.d.ts
+36
Original file line number
Diff line number
Diff line change
@@ -1465,6 +1465,33 @@ declare namespace Types {
1465
1465
error: ErrorInfo;
1466
1466
}
1467
1467
1468
+
/**
1469
+
* The `TokenRevocationOptions` interface describes the additional options accepted by the following methods:
1470
+
*
1471
+
* - {@link AuthCallbacks.revokeTokens}
1472
+
* - {@link AuthPromise.revokeTokens}
1473
+
*/
1474
+
interfaceTokenRevocationOptions{
1475
+
issuedBefore?: number;
1476
+
allowReauthMargin?: boolean;
1477
+
}
1478
+
1479
+
interfaceTokenRevocationTargetSpecifier{
1480
+
type: string;
1481
+
value: string;
1482
+
}
1483
+
1484
+
interfaceTokenRevocationSuccessResult{
1485
+
target: string;
1486
+
appliesAt: number;
1487
+
issuedBefore: number;
1488
+
}
1489
+
1490
+
interfaceTokenRevocationFailureResult{
1491
+
target: string;
1492
+
error: ErrorInfo;
1493
+
}
1494
+
1468
1495
// Common Listeners
1469
1496
/**
1470
1497
* A standard callback format used in most areas of the callback API.
@@ -2056,6 +2083,11 @@ declare namespace Types {
2056
2083
* @param callback - A function which, upon success, will be called with a {@link TokenDetails} object. Upon failure, the function will be called with information about the error.
* @returns A promise which, upon success, will be fulfilled with a {@link TokenDetails} object. Upon failure, the promise will be rejected with an {@link ErrorInfo} object which explains the error.
// ...and then, we create new instances of Rest, configured to use the tokens we fetched pre-revocation, and check that when we try to perform a REST request using these tokens, it results in a "token revoked" (40141) error.
517
+
//
518
+
// TODO we're currently not actually able to check for a 40141 error, since it's being absorbed due to https://github.com/ably/ably-js/issues/1409. So for now we just have to use the fact that the library is performing a re-auth as our signal that the token must have been revoked. This is not ideal, and we should fix it as part of the mentioned issue.
0 commit comments