Class OAuthServerKeyManagerImpl
- java.lang.Object
- 
- org.nuxeo.runtime.model.DefaultComponent
- 
- org.nuxeo.ecm.platform.oauth.keys.OAuthServerKeyManagerImpl
 
 
- 
- All Implemented Interfaces:
- OAuthServerKeyManager,- Adaptable,- Component,- Extensible,- TimestampedService
 
 public class OAuthServerKeyManagerImpl extends DefaultComponent implements OAuthServerKeyManager Implements theOAuthServerKeyManagerinterface. 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
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected classOAuthServerKeyManagerImpl.InternalNuxeoOAuthConsumer
 - 
Field SummaryFields Modifier and Type Field Description protected NuxeoOAuthConsumerconsumerprotected StringinternalKeyprotected StringinternalSecretprotected ServerKeyDescriptorserverKeyDescriptorstatic StringXP_SERVER_KEY- 
Fields inherited from class org.nuxeo.runtime.model.DefaultComponentlastModified, name
 
- 
 - 
Constructor SummaryConstructors Constructor Description OAuthServerKeyManagerImpl()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate(ComponentContext context)Activates the component.StringgetBarePrivateKey()Returns the Private Key used by Nuxeo server to do RSA Signing.StringgetBarePublicCertificate()Returns the Public Key certificate used by Nuxeo server to do RSA Signing.NuxeoOAuthConsumergetInternalConsumer()Returns theNuxeoOAuthConsumerrepresenting local (embedded) Shindig instance.StringgetInternalKey()Returns the consumerKey used in Shindig => Nuxeo sign fetch.StringgetInternalSecret()Returns the consumerSecret (HMAC) used in Shindig => Nuxeo sign fetch.StringgetKeyName()Returns key name (not really used).StringgetPrivateKey()Returns the Private Key used by Nuxeo server to do RSA Signing.StringgetPublicKeyCertificate()Returns the Public Key certificate used by Nuxeo server to do RSA Signing.voidregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)protected StringstripOpenSSL(String key)voidunregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)- 
Methods inherited from class org.nuxeo.runtime.model.DefaultComponentaddRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, start, stop, unregister, unregisterExtension
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.nuxeo.runtime.model.ComponentapplicationStarted, getApplicationStartedOrder
 
- 
 
- 
- 
- 
Field Detail- 
serverKeyDescriptorprotected ServerKeyDescriptor serverKeyDescriptor 
 - 
XP_SERVER_KEYpublic static final String XP_SERVER_KEY - See Also:
- Constant Field Values
 
 - 
consumerprotected NuxeoOAuthConsumer consumer 
 - 
internalKeyprotected String internalKey 
 - 
internalSecretprotected String internalSecret 
 
- 
 - 
Method Detail- 
activatepublic void activate(ComponentContext context) Description copied from interface:ComponentActivates the component.This method is called by the runtime when a component is activated. - Specified by:
- activatein interface- Component
- Overrides:
- activatein class- DefaultComponent
- Parameters:
- context- the runtime context
 
 - 
registerContributionpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
- registerContributionin class- DefaultComponent
 
 - 
unregisterContributionpublic void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
- unregisterContributionin class- DefaultComponent
 
 - 
getPublicKeyCertificatepublic String getPublicKeyCertificate() Description copied from interface:OAuthServerKeyManagerReturns the Public Key certificate used by Nuxeo server to do RSA Signing.- Specified by:
- getPublicKeyCertificatein interface- OAuthServerKeyManager
 
 - 
getBarePublicCertificatepublic String getBarePublicCertificate() Description copied from interface:OAuthServerKeyManagerReturns the Public Key certificate used by Nuxeo server to do RSA Signing. (Removes OpenSSL decorators).- Specified by:
- getBarePublicCertificatein interface- OAuthServerKeyManager
 
 - 
getPrivateKeypublic String getPrivateKey() Description copied from interface:OAuthServerKeyManagerReturns the Private Key used by Nuxeo server to do RSA Signing.- Specified by:
- getPrivateKeyin interface- OAuthServerKeyManager
 
 - 
getBarePrivateKeypublic String getBarePrivateKey() Description copied from interface:OAuthServerKeyManagerReturns the Private Key used by Nuxeo server to do RSA Signing. (Removes OpenSSL decorators).- Specified by:
- getBarePrivateKeyin interface- OAuthServerKeyManager
 
 - 
getKeyNamepublic String getKeyName() Description copied from interface:OAuthServerKeyManagerReturns key name (not really used).- Specified by:
- getKeyNamein interface- OAuthServerKeyManager
 
 - 
getInternalKeypublic String getInternalKey() Description copied from interface:OAuthServerKeyManagerReturns the consumerKey used in Shindig => Nuxeo sign fetch.- Specified by:
- getInternalKeyin interface- OAuthServerKeyManager
 
 - 
getInternalSecretpublic String getInternalSecret() Description copied from interface:OAuthServerKeyManagerReturns the consumerSecret (HMAC) used in Shindig => Nuxeo sign fetch.- Specified by:
- getInternalSecretin interface- OAuthServerKeyManager
 
 - 
getInternalConsumerpublic NuxeoOAuthConsumer getInternalConsumer() Description copied from interface:OAuthServerKeyManagerReturns theNuxeoOAuthConsumerrepresenting local (embedded) Shindig instance.- Specified by:
- getInternalConsumerin interface- OAuthServerKeyManager
 
 
- 
 
-