View Javadoc

1   package com.atlassian.security.auth.trustedapps;
2   
3   /**
4    * Represents current application. This object is used when establishing trust with other servers and requesting them to
5    * perform privileged operations for this application.
6    */
7   public interface CurrentApplication extends Application
8   {
9       /**
10       * @deprecated since 0.34 use {@link TrustedApplicationUtils.Header.Request#ID} instead.
11       */
12      public static final String HEADER_TRUSTED_APP_ID = TrustedApplicationUtils.Header.Request.ID;
13  
14      /**
15       * @deprecated since 0.34 use {@link TrustedApplicationUtils.Header.Request#CERT} instead.
16       */
17      public static final String HEADER_TRUSTED_APP_CERT = TrustedApplicationUtils.Header.Request.CERTIFICATE;
18  
19      /**
20       * @deprecated since 0.34 use {@link TrustedApplicationUtils.Header.Request#SECRET_KEY} instead.
21       */
22      public static final String HEADER_TRUSTED_APP_SECRET_KEY = TrustedApplicationUtils.Header.Request.SECRET_KEY;
23  
24      /**
25       * @deprecated since 0.34 use {@link TrustedApplicationUtils.Header.Response#ERROR} instead.
26       */
27      public static final String HEADER_TRUSTED_APP_ERROR = TrustedApplicationUtils.Header.Response.ERROR;
28  
29      /**
30       * @deprecated since 0.34 use {@link TrustedApplicationUtils.Header.Response#STATUS} instead.
31       */
32      public static final String HEADER_TRUSTED_APP_STATUS = TrustedApplicationUtils.Header.Response.STATUS;
33  
34      /**
35       * Generates a new certificate that will be sent to the remote server when asking to perform privileged operation
36       * for this application.
37       * 
38       * @return encrypted certificate representing this application
39       * @throws InvalidCertificateException
40       */
41      public EncryptedCertificate encode(String userName);
42  }