Class AuthorizationCodeGrantType
java.lang.Object
org.mule.runtime.extension.api.connectivity.oauth.AuthorizationCodeGrantType
- All Implemented Interfaces:
org.mule.runtime.api.meta.NamedObject,OAuthGrantType
Implementation of which contains information about how to use the Authorization-Code grant type against
a particular OAuth provider
- Since:
- 1.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAuthorizationCodeGrantType(String accessTokenUrl, String authorizationUrl, String accessTokenExpr, String expirationRegex, String refreshTokenExpr, String defaultScope) Creates a new instanceAuthorizationCodeGrantType(String accessTokenUrl, String authorizationUrl, String accessTokenExpr, String expirationRegex, String refreshTokenExpr, String defaultScope, CredentialsPlacement credentialsPlacement, boolean includeRedirectUriInRefreshTokenRequest) Creates a new instance -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(OAuthGrantTypeVisitor visitor) Accepts a visitorgetName()boolean
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
AuthorizationCodeGrantType
public AuthorizationCodeGrantType(String accessTokenUrl, String authorizationUrl, String accessTokenExpr, String expirationRegex, String refreshTokenExpr, String defaultScope) Creates a new instance- Parameters:
accessTokenUrl- The url of the access token endpointauthorizationUrl- The url of the authorization endpoint which initiates the danceaccessTokenExpr- Expression used to extract the access token from theaccessTokenUrlresponseexpirationRegex- Expression used to extract the expiration from theaccessTokenUrlresponserefreshTokenExpr- Expression used to extract the refresh token from theaccessTokenUrlresponsedefaultScope- The default scopes to be request
-
AuthorizationCodeGrantType
public AuthorizationCodeGrantType(String accessTokenUrl, String authorizationUrl, String accessTokenExpr, String expirationRegex, String refreshTokenExpr, String defaultScope, CredentialsPlacement credentialsPlacement, boolean includeRedirectUriInRefreshTokenRequest) Creates a new instance- Parameters:
accessTokenUrl- The url of the access token endpointauthorizationUrl- The url of the authorization endpoint which initiates the danceaccessTokenExpr- Expression used to extract the access token from theaccessTokenUrlresponseexpirationRegex- Expression used to extract the expiration from theaccessTokenUrlresponserefreshTokenExpr- Expression used to extract the refresh token from theaccessTokenUrlresponsedefaultScope- The default scopes to be requestcredentialsPlacement- The place where the credentials will be sent on the token requestincludeRedirectUriInRefreshTokenRequest- Indicates whether the redirect_uri parameter should be included in the refresh token request- Since:
- 1.4.0
-
-
Method Details
-
accept
Description copied from interface:OAuthGrantTypeAccepts a visitor- Specified by:
acceptin interfaceOAuthGrantType- Parameters:
visitor- anOAuthGrantTypeVisitor
-
getName
- Specified by:
getNamein interfaceorg.mule.runtime.api.meta.NamedObject
-
getAccessTokenUrl
- Returns:
- The url of the access token endpoint
-
getAuthorizationUrl
- Returns:
- The url of the authorization endpoint which initiates the dance
-
getAccessTokenExpr
- Specified by:
getAccessTokenExprin interfaceOAuthGrantType- Returns:
- Expression used to extract the access token from the
accessTokenUrlresponse
-
getExpirationRegex
- Specified by:
getExpirationRegexin interfaceOAuthGrantType- Returns:
- Expression used to extract the expiration from the
accessTokenUrlresponse
-
getRefreshTokenExpr
- Returns:
- Expression used to extract the refresh token from the
accessTokenUrlresponse
-
getDefaultScope
- Returns:
- The default scopes to be requested
-
getCredentialsPlacement
- Returns:
- the place where credentials will be sent for the token request
- Since:
- 1.4.0
-
includeRedirectUriInRefreshTokenRequest
public boolean includeRedirectUriInRefreshTokenRequest()- Returns:
- whether the request_uri parameter should be included in the refresh token request
- Since:
- 1.4.0
-