public class

DefaultCurrentApplicationStore

extends Object
implements Startable CurrentApplicationStore
java.lang.Object
   ↳ com.atlassian.jira.security.auth.trustedapps.DefaultCurrentApplicationStore

Summary

Fields
public static final String ACCESS_LOCK
Public Constructors
DefaultCurrentApplicationStore(ApplicationProperties applicationProperties, JiraLicenseService jiraLicenseService, CacheManager cacheManager, ClusterLockService clusterLockService)
Public Methods
CurrentApplication getCurrentApplication()
Return JIRA's com.atlassian.security.auth.trustedapps.CurrentApplication.
KeyPair getKeyPair()
Get the current KeyPair used by trusted apps.
@EventListener void onClearCache(ClearCacheEvent event)
void setCurrentApplication(String applicationId, String publicKey, String privateKey)
Set the current application's (aka JIRA's) trusted application properties.
void setCurrentApplication(String applicationId, KeyPair pair)
Set the current application's (aka JIRA's) trusted application properties.
void start()
This method will be called after the plugin system is fully initialised and all components added to the dependency injection framework.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.extension.Startable
From interface com.atlassian.jira.security.auth.trustedapps.CurrentApplicationStore

Fields

public static final String ACCESS_LOCK

Public Constructors

public DefaultCurrentApplicationStore (ApplicationProperties applicationProperties, JiraLicenseService jiraLicenseService, CacheManager cacheManager, ClusterLockService clusterLockService)

Public Methods

public CurrentApplication getCurrentApplication ()

Return JIRA's com.atlassian.security.auth.trustedapps.CurrentApplication. Will create a CurrentApplication if one does not exist or has been set.

Returns
  • JIRA's CurrentApplication.

public KeyPair getKeyPair ()

Get the current KeyPair used by trusted apps.

Returns

@EventListener public void onClearCache (ClearCacheEvent event)

public void setCurrentApplication (String applicationId, String publicKey, String privateKey)

Set the current application's (aka JIRA's) trusted application properties.

Parameters
applicationId the name of JIRA's trusted application. Passing null will set an automatically generated ID.
publicKey string representation of the public key. Must be a valid key or a IllegalArgumentException will be thrown.
privateKey string representation of the private key. Must be valid key or a IllegalArgumentException will be thrown.

public void setCurrentApplication (String applicationId, KeyPair pair)

Set the current application's (aka JIRA's) trusted application properties.

Parameters
applicationId the name of JIRA's trusted application. Passing an empty or null string will result in an IllegalArgumentException.
pair public and private key used for trusted apps. Passing null for pair or either the private or public key will result in an IllegalArgumentException.

public void start ()

This method will be called after the plugin system is fully initialised and all components added to the dependency injection framework.

Throws
Exception