Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.oauth.keys
Class OAuthServerKeyManagerImpl

java.lang.Object
  extended by org.nuxeo.runtime.model.DefaultComponent
      extended by org.nuxeo.ecm.platform.oauth.keys.OAuthServerKeyManagerImpl
All Implemented Interfaces:
OAuthServerKeyManager, Adaptable, Component, Extensible

public class OAuthServerKeyManagerImpl
extends DefaultComponent
implements OAuthServerKeyManager

Implements the OAuthServerKeyManager interface. Manages an extention point to configure RSA Key Pair. Shindig/Nuxeo HMAC shared secret is dynamically generated at startup time (and shared between Nuxeo OAUth Filter and Shindig directly in memory).

Author:
tiry

Field Summary
static String XP_SERVER_KEY
           
 
Constructor Summary
OAuthServerKeyManagerImpl()
           
 
Method Summary
 void activate(ComponentContext context)
          Activates the component.
 String getBarePrivateKey()
          Returns the Private Key used by Nuxeo server to do RSA Signing.
 String getBarePublicCertificate()
          Returns the Public Key certificate used by Nuxeo server to do RSA Signing.
 NuxeoOAuthConsumer getInternalConsumer()
          Returns the NuxeoOAuthConsumer representing local (embedded) Shindig instance.
 String getInternalKey()
          Returns the consumerKey used in Shindig => Nuxeo sign fetch.
 String getInternalSecret()
          Returns the consumerSecret (HMAC) used in Shindig => Nuxeo sign fetch.
 String getKeyName()
          Returns key name (not really used).
 String getPrivateKey()
          Returns the Private Key used by Nuxeo server to do RSA Signing.
 String getPublicKeyCertificate()
          Returns the Public Key certificate used by Nuxeo server to do RSA Signing.
 void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
           
 void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
           
 
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
applicationStarted, deactivate, getAdapter, registerExtension, unregisterExtension
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XP_SERVER_KEY

public static final String XP_SERVER_KEY
See Also:
Constant Field Values
Constructor Detail

OAuthServerKeyManagerImpl

public OAuthServerKeyManagerImpl()
Method Detail

activate

public void activate(ComponentContext context)
              throws Exception
Description copied from interface: Component
Activates the component.

This method is called by the runtime when a component is activated.

Specified by:
activate in interface Component
Overrides:
activate in class DefaultComponent
Parameters:
context - the runtime context
Throws:
Exception - if an error occurs during activation

registerContribution

public void registerContribution(Object contribution,
                                 String extensionPoint,
                                 ComponentInstance contributor)
                          throws Exception
Overrides:
registerContribution in class DefaultComponent
Throws:
Exception

unregisterContribution

public void unregisterContribution(Object contribution,
                                   String extensionPoint,
                                   ComponentInstance contributor)
                            throws Exception
Overrides:
unregisterContribution in class DefaultComponent
Throws:
Exception

getPublicKeyCertificate

public String getPublicKeyCertificate()
Description copied from interface: OAuthServerKeyManager
Returns the Public Key certificate used by Nuxeo server to do RSA Signing.

Specified by:
getPublicKeyCertificate in interface OAuthServerKeyManager

getBarePublicCertificate

public String getBarePublicCertificate()
Description copied from interface: OAuthServerKeyManager
Returns the Public Key certificate used by Nuxeo server to do RSA Signing. (Removes OpenSSL decorators).

Specified by:
getBarePublicCertificate in interface OAuthServerKeyManager

getPrivateKey

public String getPrivateKey()
Description copied from interface: OAuthServerKeyManager
Returns the Private Key used by Nuxeo server to do RSA Signing.

Specified by:
getPrivateKey in interface OAuthServerKeyManager

getBarePrivateKey

public String getBarePrivateKey()
Description copied from interface: OAuthServerKeyManager
Returns the Private Key used by Nuxeo server to do RSA Signing. (Removes OpenSSL decorators).

Specified by:
getBarePrivateKey in interface OAuthServerKeyManager

getKeyName

public String getKeyName()
Description copied from interface: OAuthServerKeyManager
Returns key name (not really used).

Specified by:
getKeyName in interface OAuthServerKeyManager

getInternalKey

public String getInternalKey()
Description copied from interface: OAuthServerKeyManager
Returns the consumerKey used in Shindig => Nuxeo sign fetch.

Specified by:
getInternalKey in interface OAuthServerKeyManager

getInternalSecret

public String getInternalSecret()
Description copied from interface: OAuthServerKeyManager
Returns the consumerSecret (HMAC) used in Shindig => Nuxeo sign fetch.

Specified by:
getInternalSecret in interface OAuthServerKeyManager

getInternalConsumer

public NuxeoOAuthConsumer getInternalConsumer()
Description copied from interface: OAuthServerKeyManager
Returns the NuxeoOAuthConsumer representing local (embedded) Shindig instance.

Specified by:
getInternalConsumer in interface OAuthServerKeyManager

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.