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 {@link Request#execute(com.atlassian.sal.api.net.ResponseHandler)}.
5 *
6 * This extracts methods originally part of {@link com.atlassian.sal.api.net.Request}
7 *
8 * @since 3.0.0
9 */
10 public interface TrustedRequest extends Request {
11 /**
12 * Adds TrustedTokenAuthentication to the request. Trusted token authenticator uses current user to make a trusted application call.
13 *
14 * @param hostname Hostname that this authentication applies to
15 * @return a reference to this object.
16 */
17 TrustedRequest addTrustedTokenAuthentication(final String hostname);
18
19 /**
20 * Adds TrustedTokenAuthentication to the request. Trusted token authenticator uses the passed user to make a trusted application call.
21 *
22 * @param hostname Hostname that this authentication applies to
23 * @param username The user to make the request with
24 * @return this
25 */
26 TrustedRequest addTrustedTokenAuthentication(final String hostname, final String username);
27 }