public class

OAuthApplinksResponseHandler

extends Object
implements ApplicationLinkResponseHandler<R>
java.lang.Object
   ↳ com.atlassian.applinks.core.auth.oauth.OAuthApplinksResponseHandler<R>

Summary

Constants
int MAX_REDIRECTS
Public Constructors
OAuthApplinksResponseHandler(ApplicationLinkResponseHandler<R> applicationLinkResponseHandler, ConsumerTokenStoreService consumerTokenStoreService, OAuthRequest wrappedRequest, ApplicationId applicationId, String username, boolean followRedirects)
Public Methods
R credentialsRequired(Response response)
Triggered when a call to a remote server failed because the caller does not have an established session with the server and will need to authorize requests first by visiting the authorization URL provided by AuthorisationURIGenerator.
R handle(Response response)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.applinks.api.ApplicationLinkResponseHandler
From interface com.atlassian.sal.api.net.ReturningResponseHandler

Constants

public static final int MAX_REDIRECTS

Constant Value: 3 (0x00000003)

Public Constructors

public OAuthApplinksResponseHandler (ApplicationLinkResponseHandler<R> applicationLinkResponseHandler, ConsumerTokenStoreService consumerTokenStoreService, OAuthRequest wrappedRequest, ApplicationId applicationId, String username, boolean followRedirects)

Public Methods

public R credentialsRequired (Response response)

Triggered when a call to a remote server failed because the caller does not have an established session with the server and will need to authorize requests first by visiting the authorization URL provided by AuthorisationURIGenerator.

In this callback method the user still gets access to the full response the server returned.

Note that for any request, only one callback method will ever be invoked. Either this one, or handle(com.atlassian.sal.api.net.Response).

If your implementation of this callback method produces a result object, you can parameterise the handler accordingly and return your result. If you are not returning anything, you can parameterise with java.lang.Void and return null.

Parameters
response a response object. Never null.
Returns
  • the result produced by this handler.
Throws
ResponseException

public R handle (Response response)

Throws
ResponseException