Class Overview
Servlet to configure Trusted Applications in the role as consumer (a.k.a.
outbound requests to a remote host).
Renders the the outbound trusted apps configuration screen, which contains a
checkbox to enable/disable trusted requests into the remote application.
When the user enables trusted apps for the Applink at hand, this servlet
will first redirect to the Trusted Apps Reciprocal Servlet on the peer which
will download the certificate from us and store it locally, or delete our
certificate if we sent the action=disable parameter. It will then redirect
the browser back to us here, indicating whether or not it was able to
perform the requested action by adding result=[success|failure] to the URL's
query parameters. If successful, we will set the flag in
AuthenticationConfigurationManager
to indicate that Trusted Apps is
enabled for outbound requests (or remove the check if the action was to
disable).
Alternatively, if the peer reported failure, we will not make any local
state changes, but render an appropriate error.
Registered under:
- /plugins/servlet/applinks/auth/conf/trusted/outbound-ual/{application_id}
- /plugins/servlet/applinks/auth/conf/trusted/outbound-non-ual/{application_id}
Summary
Public Constructors |
|
ConsumerConfigurationServlet(I18nResolver i18nResolver, TemplateRenderer templateRenderer, AdminUIAuthenticator adminUIAuthenticator, WebResourceManager webResourceManager, AuthenticationConfigurationManager configurationManager, ApplicationLinkService applicationLinkService, MessageFactory messageFactory, TrustedApplicationsManager trustedApplicationsManager, TrustedApplicationsConfigurationManager trustedAppsManager, InternalHostApplication hostApplication, TrustConfigurator trustConfigurator, BatchedJSONi18NBuilderFactory batchedJSONi18NBuilderFactory, LoginUriProvider loginUriProvider, DocumentationLinker documentationLinker, WebSudoManager webSudoManager, XsrfTokenAccessor xsrfTokenAccessor, XsrfTokenValidator xsrfTokenValidator)
|
Protected Methods |
void
|
doGet(HttpServletRequest request, HttpServletResponse response)
|
void
|
doPost(HttpServletRequest request, HttpServletResponse response)
Posted to by the form for outbound Trusted Applications with legacy
(non-UAL) peers.
|
Action
|
getAction(HttpServletRequest request)
|
List<String>
|
getRequiredWebResources()
Implement this method to get one of more Plugin Web Resources included
in the rendered page.
|
boolean
|
peerHasUAL(HttpServletRequest request)
|
void
|
render(HttpServletRequest request, HttpServletResponse response, String consumer, String consumerAppType, String provider, String providerAppType, boolean enabled, Map<String, Object> renderContext)
|
[Expand]
Inherited Methods |
From class
com.atlassian.applinks.core.auth.AbstractAuthServlet
|
From class
com.atlassian.applinks.ui.AbstractAppLinksAdminOnlyServlet
void
|
doProtectedService(HttpServletRequest request, HttpServletResponse response)
Override this method for operations that need to occur before control is
delegated to {{doGet()}}, {{doPost()}}, etc.
|
final
void
|
doService(HttpServletRequest request, HttpServletResponse response)
Override this method for operations that need to occur before control is
delegated to {{doGet()}}, {{doPost()}}, etc.
|
|
From class
com.atlassian.applinks.ui.AbstractApplinksServlet
RendererContextBuilder
|
createContextBuilder(ApplicationLink applicationLink)
|
void
|
doService(HttpServletRequest request, HttpServletResponse response)
Override this method for operations that need to occur before control is
delegated to {{doGet()}}, {{doPost()}}, etc.
|
final
Map<String, Object>
|
emptyContext()
|
String
|
getRequiredParameter(HttpServletRequest request, String name)
|
List<String>
|
getRequiredWebResources()
Implement this method to get one of more Plugin Web Resources included
in the rendered page.
|
void
|
render(String template, Map<String, Object> renderContext, HttpServletRequest request, HttpServletResponse response)
|
final
void
|
service(HttpServletRequest request, HttpServletResponse response)
|
|
From class
javax.servlet.http.HttpServlet
void
|
doDelete(HttpServletRequest arg0, HttpServletResponse arg1)
|
void
|
doGet(HttpServletRequest arg0, HttpServletResponse arg1)
|
void
|
doHead(HttpServletRequest arg0, HttpServletResponse arg1)
|
void
|
doOptions(HttpServletRequest arg0, HttpServletResponse arg1)
|
void
|
doPost(HttpServletRequest arg0, HttpServletResponse arg1)
|
void
|
doPut(HttpServletRequest arg0, HttpServletResponse arg1)
|
void
|
doTrace(HttpServletRequest arg0, HttpServletResponse arg1)
|
long
|
getLastModified(HttpServletRequest arg0)
|
void
|
service(ServletRequest arg0, ServletResponse arg1)
|
void
|
service(HttpServletRequest arg0, HttpServletResponse arg1)
|
|
From class
javax.servlet.GenericServlet
void
|
destroy()
|
String
|
getInitParameter(String arg0)
|
Enumeration
|
getInitParameterNames()
|
ServletConfig
|
getServletConfig()
|
ServletContext
|
getServletContext()
|
String
|
getServletInfo()
|
String
|
getServletName()
|
void
|
init()
|
void
|
init(ServletConfig arg0)
|
void
|
log(String arg0, Throwable arg1)
|
void
|
log(String arg0)
|
abstract
void
|
service(ServletRequest arg0, ServletResponse arg1)
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
javax.servlet.Servlet
abstract
void
|
destroy()
|
abstract
ServletConfig
|
getServletConfig()
|
abstract
String
|
getServletInfo()
|
abstract
void
|
init(ServletConfig arg0)
|
abstract
void
|
service(ServletRequest arg0, ServletResponse arg1)
|
|
From interface
javax.servlet.ServletConfig
abstract
String
|
getInitParameter(String arg0)
|
abstract
Enumeration
|
getInitParameterNames()
|
abstract
ServletContext
|
getServletContext()
|
abstract
String
|
getServletName()
|
|
Constants
public
static
final
String
TRUSTED_APPS_INCOMING_ID
Constant Value:
"trustedapps.incoming.applicationId"
protected
static
final
String
VM_TEMPLATE
Constant Value:
"auth/trusted/config.vm"
Fields
protected
final
TrustedApplicationsManager
trustedApplicationsManager
protected
final
TrustedApplicationsConfigurationManager
trustedAppsManager
Public Constructors
public
ConsumerConfigurationServlet
(I18nResolver i18nResolver, TemplateRenderer templateRenderer, AdminUIAuthenticator adminUIAuthenticator, WebResourceManager webResourceManager, AuthenticationConfigurationManager configurationManager, ApplicationLinkService applicationLinkService, MessageFactory messageFactory, TrustedApplicationsManager trustedApplicationsManager, TrustedApplicationsConfigurationManager trustedAppsManager, InternalHostApplication hostApplication, TrustConfigurator trustConfigurator, BatchedJSONi18NBuilderFactory batchedJSONi18NBuilderFactory, LoginUriProvider loginUriProvider, DocumentationLinker documentationLinker, WebSudoManager webSudoManager, XsrfTokenAccessor xsrfTokenAccessor, XsrfTokenValidator xsrfTokenValidator)
Protected Methods
protected
void
doGet
(HttpServletRequest request, HttpServletResponse response)
protected
void
doPost
(HttpServletRequest request, HttpServletResponse response)
Posted to by the form for outbound Trusted Applications with legacy
(non-UAL) peers.
protected
Action
getAction
(HttpServletRequest request)
protected
List<String>
getRequiredWebResources
()
Implement this method to get one of more Plugin Web Resources included
in the rendered page. Must not return null
.
Returns
- a list of web resource keys
(e.g.
"com.atlassian.applinks.applinks-plugin:basic-js"
)
protected
boolean
peerHasUAL
(HttpServletRequest request)
protected
void
render
(HttpServletRequest request, HttpServletResponse response, String consumer, String consumerAppType, String provider, String providerAppType, boolean enabled, Map<String, Object> renderContext)