@Alias(value="authorization-code-grant-type") public class DefaultAuthorizationCodeGrantType extends AbstractGrantType implements org.mule.runtime.api.lifecycle.Lifecycle, AuthorizationCodeGrantType
oauth:authentication-code-config.
This config will: - If the authorization-request is defined then it will create a flow listening for an user call to begin the oauth login. - If the token-request is defined then it will create a flow for listening in the redirect uri so we can get the authentication code and retrieve the access token
muleContext, resolver, tokenManager| Constructor and Description |
|---|
DefaultAuthorizationCodeGrantType() |
| Modifier and Type | Method and Description |
|---|---|
void |
authenticate(HttpRequestBuilder builder) |
void |
dispose() |
String |
getClientId() |
String |
getClientSecret() |
String |
getExternalCallbackUrl() |
HttpListenerConfig |
getLocalCallbackConfig() |
String |
getLocalCallbackConfigPath() |
String |
getLocalCallbackUrl() |
HttpServer |
getServer() |
org.mule.runtime.api.tls.TlsContextFactory |
getTlsContext() |
ConfigOAuthContext |
getUserOAuthContext() |
void |
initialise() |
void |
setMuleContext(MuleContext muleContext) |
boolean |
shouldRetry(org.mule.runtime.extension.api.runtime.operation.Result<Object,HttpResponseAttributes> firstAttemptResult) |
void |
start() |
void |
stop() |
buildAuthorizationHeaderContentpublic HttpListenerConfig getLocalCallbackConfig()
getLocalCallbackConfig in interface AuthorizationCodeGrantTypepublic String getLocalCallbackConfigPath()
getLocalCallbackConfigPath in interface AuthorizationCodeGrantTypepublic String getLocalCallbackUrl()
getLocalCallbackUrl in interface AuthorizationCodeGrantTypepublic String getExternalCallbackUrl()
getExternalCallbackUrl in interface AuthorizationCodeGrantTypepublic ConfigOAuthContext getUserOAuthContext()
getUserOAuthContext in interface AuthorizationCodeGrantTypepublic String getClientSecret()
getClientSecret in interface ApplicationCredentialspublic String getClientId()
getClientId in interface ApplicationCredentialspublic org.mule.runtime.api.tls.TlsContextFactory getTlsContext()
getTlsContext in interface AuthorizationCodeGrantTypepublic void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionpublic void authenticate(HttpRequestBuilder builder) throws org.mule.runtime.api.exception.MuleException
authenticate in interface HttpAuthenticationorg.mule.runtime.api.exception.MuleExceptionpublic boolean shouldRetry(org.mule.runtime.extension.api.runtime.operation.Result<Object,HttpResponseAttributes> firstAttemptResult) throws org.mule.runtime.api.exception.MuleException
shouldRetry in interface HttpAuthenticationorg.mule.runtime.api.exception.MuleExceptionpublic void setMuleContext(MuleContext muleContext)
setMuleContext in interface MuleContextAwaresetMuleContext in class AbstractGrantTypepublic void start()
throws org.mule.runtime.api.exception.MuleException
start in interface org.mule.runtime.api.lifecycle.Startableorg.mule.runtime.api.exception.MuleExceptionpublic void stop()
throws org.mule.runtime.api.exception.MuleException
stop in interface org.mule.runtime.api.lifecycle.Stoppableorg.mule.runtime.api.exception.MuleExceptionpublic void dispose()
dispose in interface org.mule.runtime.api.lifecycle.Disposablepublic HttpServer getServer()
getServer in interface AuthorizationCodeGrantTypeCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.