Class RequestTokenGrantCallback
java.lang.Object
com.amilesend.tmdb.client.connection.auth.RequestTokenGrantCallback
- All Implemented Interfaces:
HttpHandler
Callback to handle approval or denial responses upon requesting a token used to create a user session.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
-
Constructor Summary
ConstructorsConstructorDescriptionRequestTokenGrantCallback
(String callbackPath, String successLandingPageUrl, String failureLandingPageUrl) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
The URL to proceed with session registration.void
handle
(@NonNull HttpExchange httpExchange) void
Releases the lock.boolean
Blocks until the server receives a request token auth grant approval, or when the lock is explicitly released (e.g., shutdown).
-
Constructor Details
-
RequestTokenGrantCallback
-
-
Method Details
-
handle
- Specified by:
handle
in interfaceHttpHandler
- Throws:
IOException
-
waitForApprovalStatus
Blocks until the server receives a request token auth grant approval, or when the lock is explicitly released (e.g., shutdown).- Returns:
- the authorization callback url used to request a new session.
- Throws:
SessionException
- if no response was ever received from TMDB
-
releaseLock
public void releaseLock()Releases the lock. -
builder
-
getIsApproved
The URL to proceed with session registration. When notnull
, this implies that the request token grant was approved.
-