Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
strehle committed May 31, 2024
1 parent e5678e9 commit 59e35d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,12 +297,12 @@ public ResponseEntity<IdentityProviderStatus> updateIdentityProviderStatus(@Path
public ResponseEntity<List<IdentityProvider>> retrieveIdentityProviders(
@RequestParam(value = "active_only", required = false) String activeOnly,
@RequestParam(required = false, defaultValue = "false") boolean rawConfig,
@RequestParam(required = false, defaultValue = "") String origin)
@RequestParam(required = false, defaultValue = "") String originKey)
{
boolean retrieveActiveOnly = Boolean.parseBoolean(activeOnly);
List<IdentityProvider> identityProviderList;
if (UaaStringUtils.isNotEmpty(origin)) {
identityProviderList = List.of(identityProviderProvisioning.retrieveByOrigin(origin, identityZoneManager.getCurrentIdentityZoneId()));
if (UaaStringUtils.isNotEmpty(originKey)) {
identityProviderList = List.of(identityProviderProvisioning.retrieveByOrigin(originKey, identityZoneManager.getCurrentIdentityZoneId()));
} else {
identityProviderList = identityProviderProvisioning.retrieveAll(retrieveActiveOnly, identityZoneManager.getCurrentIdentityZoneId());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ void getFilteredIdentityProviders() throws Exception {
mockMvc.perform(get("/identity-providers")
.param("rawConfig", "false")
.param("active_only", "false")
.param("origin", "my-oauth2-provider")
.param("originKey", "my-oauth2-provider")
.header("Authorization", "Bearer " + adminToken)
.contentType(APPLICATION_JSON))
.andExpect(status().isOk())
Expand All @@ -1003,7 +1003,7 @@ void getFilteredIdentityProviders() throws Exception {
requestParameters(
parameterWithName("rawConfig").optional("false").type(BOOLEAN).description("Flag indicating whether the response should use raw, unescaped JSON for the `config` field of the IDP, rather than the default behavior of encoding the JSON as a string."),
parameterWithName("active_only").optional("false").type(BOOLEAN).description("Flag indicating whether only active IdPs should be returned or all."),
parameterWithName("origin").optional(null).type(STRING).description("<small><mark>UAA 77.10.0</mark></small> Return only IdPs with specific origin.")
parameterWithName("originKey").optional(null).type(STRING).description("<small><mark>UAA 77.10.0</mark></small> Return only IdPs with specific origin.")
),
responseFields));
}
Expand Down

0 comments on commit 59e35d5

Please sign in to comment.