Class Overview
Servlet to configure Trusted Applications in the role as provider (a.k.a.
inbound requests from a remote host).
This servlet has two faces. The first is as the counterpart servlet for
ConsumerConfigurationServlet
. When
the latter is used to enable incoming Trusted Apps requests, it will first
redirect the browser to this servlet (running on the peer) which will
attempt to register the caller as a trusted application in the Trusted
Application's plugin by downloading the certificate from the caller.
If this servlet is successful in performing the requested action (either
installing or removing te Trusted Apps certificate for the peer), it will
redirect the browser back to the
ConsumerConfigurationServlet
running
on the peer, passing along the result=[success|failure]
query
parameter. This redirection is done using the callback
URL parameter
that the caller
(ConsumerConfigurationServlet
) passed
in the URL string.
Registered under:
/plugins/servlet/applinks/auth/conf/trusted/inbound-ual/{application_id}?action=[ENABLE|DISABLE]&callback=http://full/url
The second task of this servlet is to locally configure Trusted Applications
as a service provider for a non-UAL peer. In this scenario the servlet
behaves like the old Trusted Applications configuration servlets that take a
URL and download and install the peer's public key. In this mode will the
servlet actually render output, while the former mode will always end in a
redirect to the peer.
Registered under:
/plugins/servlet/applinks/auth/conf/trusted/inbound-non-ual/{application_id}
Summary
Public Constructors |
|
ProviderConfigurationServlet(I18nResolver i18nResolver, TemplateRenderer templateRenderer, AdminUIAuthenticator adminUIAuthenticator, WebResourceManager webResourceManager, ApplicationLinkService applicationLinkService, MessageFactory messageFactory, TrustedApplicationsConfigurationManager trustedAppsManager, AuthenticationConfigurationManager configurationManager, TrustedApplicationsManager trustedApplicationsManager, InternalHostApplication hostApplication, TrustConfigurator trustConfigurator, BatchedJSONi18NBuilderFactory batchedJSONi18NBuilderFactory, LoginUriProvider loginUriProvider, DocumentationLinker documentationLinker, WebSudoManager webSudoManager, XsrfTokenAccessor xsrfTokenAccessor, XsrfTokenValidator xsrfTokenValidator)
|
Protected Methods |
void
|
doGet(HttpServletRequest request, HttpServletResponse response)
Unfortunately we have to support GET, because this servlet is invoked
from a 302 redirect.
|
void
|
doPost(HttpServletRequest request, HttpServletResponse response)
Posted to from the local inbound form to enable/disable inbound TA.
|
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
ProviderConfigurationServlet
(I18nResolver i18nResolver, TemplateRenderer templateRenderer, AdminUIAuthenticator adminUIAuthenticator, WebResourceManager webResourceManager, ApplicationLinkService applicationLinkService, MessageFactory messageFactory, TrustedApplicationsConfigurationManager trustedAppsManager, AuthenticationConfigurationManager configurationManager, TrustedApplicationsManager trustedApplicationsManager, 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)
Unfortunately we have to support GET, because this servlet is invoked
from a 302 redirect.
protected
void
doPost
(HttpServletRequest request, HttpServletResponse response)
Posted to from the local inbound form to enable/disable inbound TA.
This will also redirect to the peer to enable reciprocal outbound trust.
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)