com.atlassian.security.auth.trustedapps
Class DefaultCurrentApplication

java.lang.Object
  extended bycom.atlassian.security.auth.trustedapps.DefaultCurrentApplication
All Implemented Interfaces:
Application, CurrentApplication

public class DefaultCurrentApplication
extends java.lang.Object
implements CurrentApplication


Field Summary
protected  java.lang.String id
           
protected  java.security.PrivateKey privateKey
           
protected  java.security.PublicKey publicKey
           
 
Fields inherited from interface com.atlassian.security.auth.trustedapps.CurrentApplication
HEADER_TRUSTED_APP_CERT, HEADER_TRUSTED_APP_ERROR, HEADER_TRUSTED_APP_ID, HEADER_TRUSTED_APP_SECRET_KEY, HEADER_TRUSTED_APP_STATUS
 
Constructor Summary
DefaultCurrentApplication(EncryptionProvider encryptionProvider, java.security.PublicKey publicKey, java.security.PrivateKey privateKey, java.lang.String id)
           
DefaultCurrentApplication(java.security.PublicKey publicKey, java.security.PrivateKey privateKey, java.lang.String id)
           
 
Method Summary
 EncryptedCertificate encode(java.lang.String userName)
          Returned String can be used as a certificate to talk to the server that trusts this application.
 java.lang.String getID()
           
 java.security.PublicKey getPublicKey()
          Public key of this application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected final java.lang.String id

publicKey

protected final java.security.PublicKey publicKey

privateKey

protected final java.security.PrivateKey privateKey
Constructor Detail

DefaultCurrentApplication

public DefaultCurrentApplication(EncryptionProvider encryptionProvider,
                                 java.security.PublicKey publicKey,
                                 java.security.PrivateKey privateKey,
                                 java.lang.String id)

DefaultCurrentApplication

public DefaultCurrentApplication(java.security.PublicKey publicKey,
                                 java.security.PrivateKey privateKey,
                                 java.lang.String id)
Method Detail

encode

public EncryptedCertificate encode(java.lang.String userName)
Returned String can be used as a certificate to talk to the server that trusts this application. I.e. the ID of this app and the certificate go into the following header parameters: CurrentApplication.HEADER_TRUSTED_APP_CERT CurrentApplication.HEADER_TRUSTED_APP_ID

Specified by:
encode in interface CurrentApplication
Returns:
encrypted certificate representing this application

getID

public java.lang.String getID()
Specified by:
getID in interface Application
Returns:
Unique ID representing this application

getPublicKey

public java.security.PublicKey getPublicKey()
Description copied from interface: Application
Public key of this application. Public key will be sent to the remote server when requesting it to trust this application.

Specified by:
getPublicKey in interface Application


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.