Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public interface OidcLoopbackRedirect
Service-provider interface that SystemBrowser uses to sign in through the
user’s own browser on a desktop, as command-line tools do: the app listens
on the loopback interface, opens the default browser at the authorization
URL, and the identity provider redirects the browser to
http://127.0.0.1:<port>/<path> (RFC 8252 section 7.3).
The JavaSE port (the simulator and desktop apps) registers one through
SystemBrowser.setLoopbackProvider(OidcLoopbackRedirect). OidcClient
uses it when the application has set
OidcClient.setLoopbackRedirectUri(String).
Nested types
interface OidcLoopbackRedirect.Listener | One sign-in’s listener. |
Methods
public abstract boolean isSupported() | true if this implementation can listen on the loopback interface and open a browser on the current machine. |
public abstract OidcLoopbackRedirect.Listener listen(String host, int port, String path)
throws IOException | Starts listening on 127.0.0.1 for one request to path. |
Method details
isSupported
public abstract boolean isSupported()true if this implementation can listen on the loopback interface
and open a browser on the current machine.listen
public abstract OidcLoopbackRedirect.Listener listen(String host, int port, String path)
throws IOExceptionStarts listening on
127.0.0.1 for one request to path.Parameters
hostString- The host written in the redirect URI,
127.0.0.1orlocalhost. The listener binds127.0.0.1either way. portint- The port to listen on, or 0 for any free port.
pathString- The redirect URI’s path, starting with
/.
Returns
A listener whose
Listener.getRedirectUri() names the port it bound.