|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
com.atlassian.applinks.api.CredentialsRequiredException
public class CredentialsRequiredException
Thrown by ApplicationLinkRequestFactory.createRequest(com.atlassian.sal.api.net.Request.MethodType, java.lang.String) when the endpoint requires authentication, but no
credentials are available. Consumers should redirect the user to the appropriate authorisation URI to allow the user
to authenticate with the remote application.
AuthorisationURIGenerator.getAuthorisationURI(),
Serialized Form| Constructor Summary | |
|---|---|
CredentialsRequiredException(AuthorisationURIGenerator authorisationURIGenerator,
java.lang.String message)
|
|
| Method Summary | |
|---|---|
java.net.URI |
getAuthorisationURI()
Provides a URI that can be used to configure authentication for the requested resource. |
java.net.URI |
getAuthorisationURI(java.net.URI callback)
The URI that can be used to configure authentication for the requested resource. |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CredentialsRequiredException(AuthorisationURIGenerator authorisationURIGenerator,
java.lang.String message)
| Method Detail |
|---|
public java.net.URI getAuthorisationURI()
AuthorisationURIGeneratorAuthorisationURIGenerator.getAuthorisationURI(URI callback) is optional.
getAuthorisationURI in interface AuthorisationURIGeneratorAuthorisationURIGenerator.getAuthorisationURI(URI)
returns a non-null value, this method MUST also return
a non-null value.AuthorisationURIGenerator.getAuthorisationURI(URI)public java.net.URI getAuthorisationURI(java.net.URI callback)
AuthorisationURIGeneratorThe URI that can be used to configure authentication for the requested resource.
The typical scenario is a call to an OAuth-protected remote resource for which the caller does not have an access token. If the caller has the ability to send a redirect (in case of a plugin servlet or webwork action), it would do so using this URL. This URL will take the user to a local endpoint that will perform the "OAuth dance":
If the caller does not have the ability to perform an HTTP redirect to this URL (possibly because it's a Web Panel), it can display a link or button that will open the URL in a popup dialog with an iframe, allowing the user to perform the oauth dance at a later time.
getAuthorisationURI in interface AuthorisationURIGeneratorcallback - the URI to redirect to after authentication is complete
AuthorisationURIGenerator.getAuthorisationURI() MUST
also return a non-null value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||