Skip to content
Snippets Groups Projects
Commit 0350d4b5 authored by Christian ZHENG's avatar Christian ZHENG
Browse files

docs(login): add explanation for waiting duration

parent b7d1e534
No related branches found
No related tags found
3 merge requests!14feat: added mounted, .bashrc, .zshrc, added tests, added keycloak tests,!8feat(extension): login, open in devcontainer, automaticly save code, open briefing, publish extension,!1fix(view): open new views as tabs + show Getting Started button by default
...@@ -14,6 +14,14 @@ export default class KeycloakOAuth2DeviceFlowConnection { ...@@ -14,6 +14,14 @@ export default class KeycloakOAuth2DeviceFlowConnection {
private deviceAuthorizationRequestResponseData: DeviceAuthorizationRequestResponseData; private deviceAuthorizationRequestResponseData: DeviceAuthorizationRequestResponseData;
constructor(private deviceUrl: string, private tokenUrl: string, private userInfoUrl: string) { constructor(private deviceUrl: string, private tokenUrl: string, private userInfoUrl: string) {
/*
* Arbitrary durations to wait in seconds \
* Waiting time between requests should be increasing
* if Keycloak api reponds with error code `slow_down` \
* otherwise, it will continue to respond with this error code. \
* The minimal waiting duration has been chosen to not be too short: \
* Keycloak may saturate and crash due to too many requests.
*/
this.waitDuration = new WaitDuration([5_000, 5_000, 5_000, 10_000, 10_000, 10_000, 30_000, 30_000, 100_000]); this.waitDuration = new WaitDuration([5_000, 5_000, 5_000, 10_000, 10_000, 10_000, 30_000, 30_000, 100_000]);
this.accessToken = ''; this.accessToken = '';
this.refreshToken = ''; this.refreshToken = '';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment