Class OneDriveOAuthReceiver
java.lang.Object
com.amilesend.onedrive.connection.auth.oauth.OAuthReceiver
com.amilesend.onedrive.connection.auth.oauth.OneDriveOAuthReceiver
- All Implemented Interfaces:
AutoCloseable
Extends
OAuthReceiver that accounts for MS Graph scopes and client ID in order to provide the URI to query
for the auth code during the OAUTH exchange.- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class OAuthReceiver
OAuthReceiver.OAuthReceiverBuilder -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Gets the AuthCode URI that is used when initiating an OAuth handshake.The registered application client identifier.The list of scopes (permissions) for accessing the Graph API.Methods inherited from class OAuthReceiver
browse, close, defaultOAuthReceiverBuilder, getCallbackPath, getHost, getPort, getRedirectUri, start, stop, waitForCodeModifier and TypeMethodDescriptionstatic voidOpen a browser at the given URL usingDesktopif available, or alternatively output the URL toSystem.outfor command-line applications.voidclose()Closes the HTTP server resource.The path to listen for the redirect.getHost()The host of the receiver.intgetPort()The port of the receiver to listen on.Gets the redirect URI based on the running HTTP server resource.<T> Tstart()Starts the HTTP server to handle OAuth callbacks.voidstop()Stops the running HTTP server.Blocks until the server receives a login result, or the server is stopped byOAuthReceiver.stop(), to return an authorization code.
-
Method Details
-
getAuthCodeUri
Gets the AuthCode URI that is used when initiating an OAuth handshake.- Returns:
- the AuthCode URI
- Throws:
OAuthReceiverException- if an error occurred while fetching the redirect URI attribute
-
builder
-
getClientId
The registered application client identifier. -
getScopes
-