Nuxeo Enterprise Platform 5.4

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. Manage on extensition 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()
          Return the Private Key used by Nuxeo server to do RSA Signing (Removes OpenSSL decorators)
 String getBarePublicCertificate()
          Return the Public Key certificate used by Nuxeo server to do RSA Signing (Removes OpenSSL decorators)
 NuxeoOAuthConsumer getInternalConsumer()
          Return the NuxeoOAuthConsumer representing local (embeded) Shindig instance
 String getInternalKey()
          Return the consumerKey used in Shindig => Nuxeo sign fetch
 String getInternalSecret()
          Return the consumerSecret (HMAC) used in Shindig => Nuxeo sign fetch
 String getKeyName()
          Return key name (not really used)
 String getPrivateKey()
          Return the Private Key used by Nuxeo server to do RSA Signing
 String getPublicKeyCertificate()
          Return 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
Return the Public Key certificate used by Nuxeo server to do RSA Signing

Specified by:
getPublicKeyCertificate in interface OAuthServerKeyManager
Returns:

getBarePublicCertificate

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

Specified by:
getBarePublicCertificate in interface OAuthServerKeyManager
Returns:

getPrivateKey

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

Specified by:
getPrivateKey in interface OAuthServerKeyManager
Returns:

getBarePrivateKey

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

Specified by:
getBarePrivateKey in interface OAuthServerKeyManager
Returns:

getKeyName

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

Specified by:
getKeyName in interface OAuthServerKeyManager
Returns:

getInternalKey

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

Specified by:
getInternalKey in interface OAuthServerKeyManager
Returns:

getInternalSecret

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

Specified by:
getInternalSecret in interface OAuthServerKeyManager
Returns:

getInternalConsumer

public NuxeoOAuthConsumer getInternalConsumer()
Description copied from interface: OAuthServerKeyManager
Return the NuxeoOAuthConsumer representing local (embeded) Shindig instance

Specified by:
getInternalConsumer in interface OAuthServerKeyManager
Returns:

Nuxeo Enterprise Platform 5.4

Copyright © 2011 Nuxeo SAS. All Rights Reserved.