Package com.atlassian.connect.spring
Provides classes for building Atlassian Connect add-ons using
Spring Boot and
atlassian-connect-spring-boot.
To use the Spring Boot starter for Atlassian Connect in your application, include the following dependency in your Maven POM:
<dependency> <groupId>com.atlassian.connect</groupId> <artifactId>atlassian-connect-spring-boot-starter</artifactId> <version>${atlassian-connect-spring-boot.version}</version> </dependency>
Add-on Descriptor
To enable the functionality provided by this Spring Boot starter, an Atlassian Connect add-on descriptor,atlassian-connect.json must be present at the root of the class path.
Add-on Lifecycle
The Spring Data repositoryAtlassianHostRepository stores information about Atlassian hosts in which the
add-on is or has been installed. A component implementing this interface is required for your application to start.
Upon successful completion of add-on installation or uninstallation,
A Spring application event
will be fired: AddonInstalledEvent or
AddonUninstalledEvent.
Authentication of Incoming Requests
During processing of a request from an Atlassian host, the details of the host and of the user at the browser can be obtained from theAtlassianHostUser.
By default, all Spring Web MVC
controllers require authentication by a JSON Web Token issued by an Atlassian host with the add-on installed.
The IgnoreJwt annotation can be used to bypass that requirement.
Authentication of Outgoing Requests
AtlassianHostRestClients provides RestTemplates for making authenticated
requests to Atlassian hosts as the add-on or as a user.
Deprecated: A RestTemplate for JSON Web Token authentication is provided as a @Component and
can be @Autowired.
- Since:
- 1.0.0
- See Also:
- Atlassian Developers
-
Interface Summary Interface Description AtlassianHostRepository A Spring Data repository for information about Atlassian hosts in which the add-on is or has been installed.AtlassianHostRestClients A helper class for obtaining preconfiguredRestTemplates to make authenticated requests to Atlassian hosts. -
Class Summary Class Description AddonInstalledEvent A Spring application event fired when the add-on has been successfully installed on a host.AddonUninstalledEvent A Spring application event fired when the add-on has been successfully uninstalled from a host.AtlassianHost An Atlassian host in which the add-on is or has been installed.AtlassianHostUser The Spring Security authentication principal for requests coming from an Atlassian host application in which the add-on is installed.AtlassianHostUser.AtlassianHostUserBuilder Builder used to create anAtlassianHostUser. -
Annotation Types Summary Annotation Type Description ContextJwt An annotation used on Spring Web MVCControllers or individual controller methods to denote that a context JWT is acceptable on this endpoint.IgnoreJwt An annotation used on Spring Web MVCControllers or individual controller methods to denote that authentication by JSON Web Token is not required.