public class DefaultExtensionsOAuthManager extends Object implements org.mule.runtime.api.lifecycle.Initialisable, org.mule.runtime.api.lifecycle.Startable, org.mule.runtime.api.lifecycle.Stoppable, ExtensionsOAuthManager
| Constructor and Description |
|---|
DefaultExtensionsOAuthManager() |
| Modifier and Type | Method and Description |
|---|---|
Optional<ResourceOwnerOAuthContext> |
getOAuthContext(OAuthConfig config) |
void |
initialise() |
void |
invalidate(String ownerConfigName,
String resourceOwnerId)
Invalidates the OAuth information of a particular resourceOwnerId
|
void |
refreshToken(String ownerConfigName,
String resourceOwnerId,
OAuthConnectionProviderWrapper connectionProvider)
Performs the refresh token flow
|
void |
register(OAuthConfig config)
Becomes aware of the given
config and makes sure that the access token callback
and authorization endpoints are provisioned. |
void |
start() |
void |
stop() |
public void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionpublic void start()
throws org.mule.runtime.api.exception.MuleException
start in interface org.mule.runtime.api.lifecycle.Startableorg.mule.runtime.api.exception.MuleExceptionpublic void register(OAuthConfig config) throws org.mule.runtime.api.exception.MuleException
config and makes sure that the access token callback
and authorization endpoints are provisioned.register in interface ExtensionsOAuthManagerconfig - an OAuthConfigorg.mule.runtime.api.exception.MuleExceptionpublic void invalidate(String ownerConfigName, String resourceOwnerId)
invalidate in interface ExtensionsOAuthManagerownerConfigName - the name of the extension config which obtained the tokenresourceOwnerId - the id of the user to be invalidatedpublic void stop()
throws org.mule.runtime.api.exception.MuleException
stop in interface org.mule.runtime.api.lifecycle.Stoppableorg.mule.runtime.api.exception.MuleExceptionpublic void refreshToken(String ownerConfigName, String resourceOwnerId, OAuthConnectionProviderWrapper connectionProvider)
refreshToken in interface ExtensionsOAuthManagerownerConfigName - the name of the extension config which obtained the tokenresourceOwnerId - the id of the user to be invalidatedconnectionProvider - the OAuthConnectionProviderWrapper which produces the connectionspublic Optional<ResourceOwnerOAuthContext> getOAuthContext(OAuthConfig config)
getOAuthContext in interface ExtensionsOAuthManagerconfig - an OAuthConfigResourceOwnerOAuthContext for the given config or Optional.empty()
if authorization hasn't yet taken place or has been invalidatedCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.