Conversation
| e("failed to login, cannot continue") | ||
| updateStatus(ZitiContext.Status.NotAuthorized(it)) | ||
| throw it | ||
| val c = Retry.withExponentialBackoff { |
There was a problem hiding this comment.
just pointing out that it seems a bit strange to have a while(true) when the withExponentialBackoff func runs forever? Maybe it makes sense to do all of this in the same lambda?
There was a problem hiding this comment.
exponential backoff is only for finding a controller that is online
there is no reason to do a backoff if selected controller went offline
| } | ||
|
|
||
| internal inner class ReqInterceptor(val session: ApiSession? = null): Consumer<HttpRequest.Builder> { | ||
| internal inner class ReqInterceptor(val accessToken: ZitiAuthenticator.ZitiAccessToken): Consumer<HttpRequest.Builder> { |
There was a problem hiding this comment.
accessToken seems a bit like a misnomer
There was a problem hiding this comment.
it is a token that gives access, no?
|
|
||
| companion object { | ||
| const val CLIENT_ID = "openziti" | ||
| const val internalRedirect = "http://localhost:8080/auth/callback" |
There was a problem hiding this comment.
i assume this is just hardcoded by the controller or there's no redirect uri matching?
There was a problem hiding this comment.
I believe this is hardcoded in controller
|
|
||
| val redirectUri = resp.headers().firstValue("Location").get().run { URI.create(this) } | ||
|
|
||
| val query = redirectUri.query.split("&").associate { |
There was a problem hiding this comment.
there's no helper func for this eh? strange!
Enable SDK to work with an HA OpenZiti network: