com.atlassian.security.auth.trustedapps
Class TrustedApplicationUtils

java.lang.Object
  extended bycom.atlassian.security.auth.trustedapps.TrustedApplicationUtils

public class TrustedApplicationUtils
extends java.lang.Object

Utility class for trusted applications


Nested Class Summary
static class TrustedApplicationUtils.Constant
          Used in Request/Response Header values for validating the capabilites of the client/server.
static class TrustedApplicationUtils.Header
          Request/Response header parameters
 
Constructor Summary
TrustedApplicationUtils()
           
 
Method Summary
static void addRequestParameters(EncryptedCertificate certificate, TrustedRequest request)
          Add request parameters to the trusted request.
static TransportErrorMessage parseError(java.lang.String errorMessage)
          Get a TransportErrorMessage from the TrustedApplicationUtils.Header.Response.ERROR header.
static void validateMagicNumber(java.lang.String msg, java.lang.String appId, java.lang.Integer protocolVersion, java.lang.String magicNumber)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrustedApplicationUtils

public TrustedApplicationUtils()
Method Detail

addRequestParameters

public static void addRequestParameters(EncryptedCertificate certificate,
                                        TrustedRequest request)
Add request parameters to the trusted request. Values are extracted from the given certificate.

Parameters:
certificate - the encrypted certificate to retrieve values from
request - the request to populate

parseError

public static TransportErrorMessage parseError(java.lang.String errorMessage)
Get a TransportErrorMessage from the TrustedApplicationUtils.Header.Response.ERROR header. This contains an error code that can be used for i18n purposes as well the parameters. You can also get a default formatted error message.

Parameters:
errorMessage - the String containing the error message. Must
Returns:

validateMagicNumber

public static void validateMagicNumber(java.lang.String msg,
                                       java.lang.String appId,
                                       java.lang.Integer protocolVersion,
                                       java.lang.String magicNumber)
                                throws InvalidCertificateException
Throws:
InvalidCertificateException


Copyright © 2008 Atlassian Software Systems Pty Ltd. All Rights Reserved.