|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.api.client.extensions.jetty.auth.oauth2.LocalServerReceiver
public final class LocalServerReceiver
OAuth 2.0 verification code receiver that runs a Jetty server on a free port, waiting for a redirect with the verification code.
Implementation is thread-safe.
| Nested Class Summary | |
|---|---|
static class |
LocalServerReceiver.Builder
Builder. |
| Constructor Summary | |
|---|---|
LocalServerReceiver()
Constructor that starts the server on "localhost" selects an unused port. |
|
| Method Summary | |
|---|---|
String |
getHost()
Returns the host name to use. |
int |
getPort()
Returns the port to use or -1 to select an unused port in getRedirectUri(). |
String |
getRedirectUri()
|
void |
stop()
|
String |
waitForCode()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocalServerReceiver()
"localhost" selects an unused port.
Use LocalServerReceiver.Builder if you need to specify any of the optional parameters.
| Method Detail |
|---|
public String getRedirectUri()
throws Exception
getRedirectUri in interface VerificationCodeReceiverException
public String waitForCode()
throws Exception
waitForCode in interface VerificationCodeReceiverException
public void stop()
throws Exception
stop in interface VerificationCodeReceiverExceptionpublic String getHost()
public int getPort()
-1 to select an unused port in getRedirectUri().
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||