View Javadoc
1   package com.atlassian.sal.api.net;
2   
3   /**
4    * Interface Request represents a request to retrieve data, using Trusted Apps authentication. To execute a request call
5    * {@link Request#execute(com.atlassian.sal.api.net.ResponseHandler)}.
6    *
7    * This extracts methods originally part of {@link com.atlassian.sal.api.net.Request}
8    *
9    * @since 3.0.0
10   */
11  public interface TrustedRequest extends Request {
12      /**
13       * Adds TrustedTokenAuthentication to the request. Trusted token authenticator uses current user to make a trusted
14       * application call.
15       *
16       * @param hostname Hostname that this authentication applies to
17       * @return a reference to this object.
18       */
19      TrustedRequest addTrustedTokenAuthentication(final String hostname);
20  
21      /**
22       * Adds TrustedTokenAuthentication to the request. Trusted token authenticator uses the passed user to make a
23       * trusted application call.
24       *
25       * @param hostname Hostname that this authentication applies to
26       * @param username The user to make the request with
27       * @return this
28       */
29      TrustedRequest addTrustedTokenAuthentication(final String hostname, final String username);
30  }