Package org.apache.camel.model.rest
Class OAuth2Definition
- java.lang.Object
-
- org.apache.camel.model.rest.RestSecurityDefinition
-
- org.apache.camel.model.rest.OAuth2Definition
-
@Metadata(label="rest,security,configuration") public class OAuth2Definition extends RestSecurityDefinition
Rest security OAuth2 definition
-
-
Constructor Summary
Constructors Constructor Description OAuth2Definition()
OAuth2Definition(RestDefinition rest)
-
Method Summary
-
Methods inherited from class org.apache.camel.model.rest.RestSecurityDefinition
endSecurityDefinition, getDescription, getKey, setDescription, setKey
-
-
-
-
Constructor Detail
-
OAuth2Definition
public OAuth2Definition()
-
OAuth2Definition
public OAuth2Definition(RestDefinition rest)
-
-
Method Detail
-
getAuthorizationUrl
public String getAuthorizationUrl()
-
setAuthorizationUrl
public void setAuthorizationUrl(String authorizationUrl)
The authorization URL to be used for this flow. This SHOULD be in the form of a URL. Required for implicit and access code flows
-
getTokenUrl
public String getTokenUrl()
-
setTokenUrl
public void setTokenUrl(String tokenUrl)
The token URL to be used for this flow. This SHOULD be in the form of a URL. Required for password, application, and access code flows.
-
getRefreshUrl
public String getRefreshUrl()
-
setRefreshUrl
public void setRefreshUrl(String refreshUrl)
The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL.
-
getFlow
public String getFlow()
-
setFlow
public void setFlow(String flow)
The flow used by the OAuth2 security scheme. Valid values are "implicit", "password", "application" or "accessCode".
-
getScopes
public List<RestPropertyDefinition> getScopes()
-
setScopes
public void setScopes(List<RestPropertyDefinition> scopes)
The available scopes for an OAuth2 security scheme
-
flow
public OAuth2Definition flow(String flow)
-
authorizationUrl
public OAuth2Definition authorizationUrl(String authorizationUrl)
-
tokenUrl
public OAuth2Definition tokenUrl(String tokenUrl)
-
refreshUrl
public OAuth2Definition refreshUrl(String refreshUrl)
-
password
public OAuth2Definition password(String tokenUrl)
-
application
public OAuth2Definition application(String tokenUrl)
-
clientCredentials
public OAuth2Definition clientCredentials(String tokenUrl)
-
accessCode
public OAuth2Definition accessCode(String authorizationUrl, String tokenUrl)
-
authorizationCode
public OAuth2Definition authorizationCode(String authorizationUrl, String tokenUrl)
-
withScope
public OAuth2Definition withScope(String key, String description)
-
end
public RestSecuritiesDefinition end()
-
-