View Javadoc

1   package com.atlassian.security.auth.trustedapps;
2   
3   import javax.servlet.http.HttpServletRequest;
4   
5   
6   
7   /**
8    * Represents a trusted remote application.
9    * This object used to verify a request claiming to have come from this application.
10   * Such a request is required to have an encrypted certificate and application ID.
11   * The certificate decryption and validation is a responsibility of this object. 
12   */
13  public interface TrustedApplication extends Application
14  {
15  	/**
16  	 * This method decodes and validates the received certificate.
17  	 * 
18  	 * @param certificateStr - certificate string claiming to have come from this application
19  	 * 
20  	 * @return {@link ApplicationCertificate} object if validation succeeds
21  	 * 
22  	 * @throws InvalidCertificateException - if either decryption or validation fails
23  	 */
24  	public ApplicationCertificate decode(EncryptedCertificate certificate, HttpServletRequest request) throws InvalidCertificateException;
25  }