com.atlassian.jira.security.auth.trustedapps
Interface CurrentApplicationStore

All Known Implementing Classes:
DefaultCurrentApplicationStore

public interface CurrentApplicationStore

Store for JIRA's own CurrentApplication.

Since:
v5.0

Method Summary
 com.atlassian.security.auth.trustedapps.CurrentApplication getCurrentApplication()
          Return JIRA's CurrentApplication.
 KeyPair getKeyPair()
          Get the current KeyPair used by trusted apps.
 void setCurrentApplication(String applicationId, KeyPair pair)
          Set the current application's (aka JIRA's) trusted application properties.
 void setCurrentApplication(String applicationId, String publicKey, String privateKey)
          Set the current application's (aka JIRA's) trusted application properties.
 

Method Detail

getCurrentApplication

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

Returns:
JIRA's CurrentApplication.

getKeyPair

KeyPair getKeyPair()
Get the current KeyPair used by trusted apps.

Returns:
the KeyPair used by trustedapps.

setCurrentApplication

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.

setCurrentApplication

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.


Copyright © 2002-2012 Atlassian. All Rights Reserved.