Interface AccessibleEntitiesController
-
public interface AccessibleEntitiesController
AnOAuthProvider
that wants to support accessible entities should provide an appropriate REST endpoint via a controller implementing this interface. SeeOAuthProvider.isAccessibleEntitiesSupported()
,OAuthProvider.getAccessibleEntitiesEndpoint()
- Since:
- 2024.03
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
AccessibleEntitiesController.EntityName
static class
AccessibleEntitiesController.EntitySource
static interface
AccessibleEntitiesController.Settings
Provider-specific settings DTO for UI purposes.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AccessibleEntitiesController.EntityName
createEntityName(String value, AccessibleEntitiesController.EntitySource source)
Invoke provider-specific logic to create a proper entity name out of a provided user value.AccessibleEntitiesController.Settings
getSettings()
Provide a settings DTO for UI purposes.org.springframework.http.ResponseEntity<List<String>>
listAllowedEntities(String projectId, String connectionId)
List all allowed entity names for the scope of a given OAuth connection.
-
-
-
Method Detail
-
getSettings
@GetMapping(value="/settings", produces="application/json") @NotNull AccessibleEntitiesController.Settings getSettings()
Provide a settings DTO for UI purposes. Should be exposed underGET {baseUrl}/settings
.- Returns:
- settings DTO
- Since:
- 2024.03
-
createEntityName
@GetMapping(value="/entityName", produces="application/json") @Nullable AccessibleEntitiesController.EntityName createEntityName(@RequestParam @NotNull String value, @RequestParam @NotNull AccessibleEntitiesController.EntitySource source)
Invoke provider-specific logic to create a proper entity name out of a provided user value. The source parameter allows handling certain types of values differently. Should be exposed underGET {baseUrl}/entityName?value=
- Parameters:
value
- provided valuesource
- source of the value- Returns:
- the created entity name, if applicable
- Since:
- 2024.03
-
listAllowedEntities
@GetMapping(value="/allowed", produces="application/json") @NotNull org.springframework.http.ResponseEntity<List<String>> listAllowedEntities(@NotNull @RequestParam String projectId, @NotNull @RequestParam String connectionId)
List all allowed entity names for the scope of a given OAuth connection. Implementations should give backHTTP 501 Not Implemented
if this operation is not supported. Implementations should give backHTTP 504 Gateway Timeout
if the listing can't be completed due to downstream timeouts. Should be exposed underGET {baseUrl}/allowed?projectId=pid&connectionId=cid
- Parameters:
projectId
- the external ID of the connection's projectconnectionId
- the connection ID- Returns:
- an HTTP entity object encapsulating a list of allowed entity names
- Since:
- 2024.12
-
-