LocalhostBrowserRedirectHandler
A BrowserRedirectHandler implementation for JVM that starts a localhost HTTP server, opens the system browser, and captures the redirect callback.
The port and path must match the redirect URI registered in the Okta admin console. For example, if registered as http://localhost:8080/callback, use port = 8080 and path = "/callback".
Parameters
the port to listen on. Must match the port in the registered redirect URI.
the expected callback path. Must match the path in the registered redirect URI.
the maximum time in milliseconds to wait for the redirect. Defaults to 5 minutes.
the raw HTTP response written back to the browser after the callback is captured. Defaults to DEFAULT_SUCCESS_RESPONSE, a plain HTML page telling the user to close the window. Override to show custom branding or to issue a redirect, e.g.: "HTTP/1.1 302 Found\r\nLocation: https://app.example.com/done\r\n\r\n".
opens the given URL in a browser. Defaults to Desktop.browse.