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
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
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
-
Field Summary
Modifier and TypeFieldDescriptionprotected NuxeoOAuthConsumer
protected String
protected String
protected ServerKeyDescriptor
static final String
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activate
(ComponentContext context) Activates the component.Returns the Private Key used by Nuxeo server to do RSA Signing.Returns the Public Key certificate used by Nuxeo server to do RSA Signing.Returns theNuxeoOAuthConsumer
representing local (embedded) Shindig instance.Returns the consumerKey used in Shindig => Nuxeo sign fetch.Returns the consumerSecret (HMAC) used in Shindig => Nuxeo sign fetch.Returns key name (not really used).Returns the Private Key used by Nuxeo server to do RSA Signing.Returns the Public Key certificate used by Nuxeo server to do RSA Signing.void
registerContribution
(Object contribution, String extensionPoint, ComponentInstance contributor) protected String
stripOpenSSL
(String key) void
unregisterContribution
(Object contribution, String extensionPoint, ComponentInstance contributor) Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, start, stop, unregister, unregisterExtension
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.nuxeo.runtime.model.Component
getApplicationStartedOrder
-
Field Details
-
serverKeyDescriptor
-
XP_SERVER_KEY
- See Also:
-
consumer
-
internalKey
-
internalSecret
-
-
Constructor Details
-
OAuthServerKeyManagerImpl
public OAuthServerKeyManagerImpl()
-
-
Method Details
-
activate
Description copied from interface:Component
Activates the component.This method is called by the runtime when a component is activated.
- Specified by:
activate
in interfaceComponent
- Overrides:
activate
in classDefaultComponent
- Parameters:
context
- the runtime context
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
registerContribution
in classDefaultComponent
-
unregisterContribution
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
unregisterContribution
in classDefaultComponent
-
getPublicKeyCertificate
Description copied from interface:OAuthServerKeyManager
Returns the Public Key certificate used by Nuxeo server to do RSA Signing.- Specified by:
getPublicKeyCertificate
in interfaceOAuthServerKeyManager
-
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 interfaceOAuthServerKeyManager
-
getPrivateKey
Description copied from interface:OAuthServerKeyManager
Returns the Private Key used by Nuxeo server to do RSA Signing.- Specified by:
getPrivateKey
in interfaceOAuthServerKeyManager
-
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 interfaceOAuthServerKeyManager
-
getKeyName
Description copied from interface:OAuthServerKeyManager
Returns key name (not really used).- Specified by:
getKeyName
in interfaceOAuthServerKeyManager
-
stripOpenSSL
-
getInternalKey
Description copied from interface:OAuthServerKeyManager
Returns the consumerKey used in Shindig => Nuxeo sign fetch.- Specified by:
getInternalKey
in interfaceOAuthServerKeyManager
-
getInternalSecret
Description copied from interface:OAuthServerKeyManager
Returns the consumerSecret (HMAC) used in Shindig => Nuxeo sign fetch.- Specified by:
getInternalSecret
in interfaceOAuthServerKeyManager
-
getInternalConsumer
Description copied from interface:OAuthServerKeyManager
Returns theNuxeoOAuthConsumer
representing local (embedded) Shindig instance.- Specified by:
getInternalConsumer
in interfaceOAuthServerKeyManager
-