Package org.apache.camel.model.rest
Class RestSecurityOAuth2
- java.lang.Object
-
- org.apache.camel.model.rest.RestSecurityDefinition
-
- org.apache.camel.model.rest.RestSecurityOAuth2
-
@Metadata(label="rest,security,configuration") public class RestSecurityOAuth2 extends RestSecurityDefinition
Rest security OAuth2 definition
-
-
Constructor Summary
Constructors Constructor Description RestSecurityOAuth2()
RestSecurityOAuth2(RestDefinition rest)
-
Method Summary
-
Methods inherited from class org.apache.camel.model.rest.RestSecurityDefinition
endSecurityDefinition, getDescription, getKey, setDescription, setKey
-
-
-
-
Constructor Detail
-
RestSecurityOAuth2
public RestSecurityOAuth2()
-
RestSecurityOAuth2
public RestSecurityOAuth2(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 RestSecurityOAuth2 flow(String flow)
-
authorizationUrl
public RestSecurityOAuth2 authorizationUrl(String authorizationUrl)
-
tokenUrl
public RestSecurityOAuth2 tokenUrl(String tokenUrl)
-
refreshUrl
public RestSecurityOAuth2 refreshUrl(String refreshUrl)
-
password
public RestSecurityOAuth2 password(String tokenUrl)
-
application
public RestSecurityOAuth2 application(String tokenUrl)
-
clientCredentials
public RestSecurityOAuth2 clientCredentials(String tokenUrl)
-
accessCode
public RestSecurityOAuth2 accessCode(String authorizationUrl, String tokenUrl)
-
authorizationCode
public RestSecurityOAuth2 authorizationCode(String authorizationUrl, String tokenUrl)
-
withScope
public RestSecurityOAuth2 withScope(String key, String description)
-
end
public RestSecuritiesDefinition end()
-
-