Class AppConfigurationEndpoint
java.lang.Object
com.azure.spring.cloud.config.web.AppConfigurationEndpoint
Common class for authenticating refresh requests.
-
Constructor Summary
ConstructorDescriptionAppConfigurationEndpoint
(javax.servlet.http.HttpServletRequest request, List<ConfigStore> configStores, Map<String, String> allRequestParams) Base Authentication for refresh endpoints. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if the request is from a valid AppConfiguration Store and has a valid Token and Secret.getStore()
Returns the syncToken from the event grid requestboolean
Checks if the endpoint's store has been configured for refresh.
-
Constructor Details
-
AppConfigurationEndpoint
public AppConfigurationEndpoint(javax.servlet.http.HttpServletRequest request, List<ConfigStore> configStores, Map<String, String> allRequestParams) throws IOExceptionBase Authentication for refresh endpoints.- Parameters:
request
- Json body of the requestconfigStores
- List of all of the config stores that request could be forallRequestParams
- paramaters to validate the request.- Throws:
IOException
- Failed to read the Request body or parse it to jsonIllegalArgumentException
- Request missing valid topic field.
-
-
Method Details
-
authenticate
public boolean authenticate()Checks if the request is from a valid AppConfiguration Store and has a valid Token and Secret.- Returns:
- true if a valid connection.
-
triggerRefresh
public boolean triggerRefresh()Checks if the endpoint's store has been configured for refresh.- Returns:
- true, if the configured endpoint has monitoring enabled.
-
getSyncToken
Returns the syncToken from the event grid request- Returns:
- string value of sync token or null if it doesn't exist.
-
getValidationResponse
- Returns:
- the validationResponse
-
getEndpoint
- Returns:
- the endpoint
-
getStore
- Returns:
- the store
-