-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hide "Sync your account with existing owner" with no authentication m…
…ethod configured (#1626) Co-authored-by: vburlachenko <[email protected]> Co-authored-by: ayemets-corcentric <[email protected]>
- Loading branch information
1 parent
bbcea54
commit e44f37e
Showing
5 changed files
with
30 additions
and
16 deletions.
There are no files selected for viewing
14 changes: 11 additions & 3 deletions
14
...orm-api/src/main/java/org/opendatadiscovery/oddplatform/controller/AppInfoController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,30 @@ | ||
package org.opendatadiscovery.oddplatform.controller; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import org.opendatadiscovery.oddplatform.api.contract.api.AppInfoApi; | ||
import org.opendatadiscovery.oddplatform.api.contract.model.AppInfo; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.boot.info.BuildProperties; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.RestController; | ||
import org.springframework.web.server.ServerWebExchange; | ||
import reactor.core.publisher.Mono; | ||
|
||
@RestController | ||
@RequiredArgsConstructor | ||
public class AppInfoController implements AppInfoApi { | ||
private final BuildProperties buildProperties; | ||
private final String authType; | ||
|
||
public AppInfoController(final BuildProperties buildProperties, | ||
@Value("${auth.type}") final String authType) { | ||
this.buildProperties = buildProperties; | ||
this.authType = authType; | ||
} | ||
|
||
@Override | ||
public Mono<ResponseEntity<AppInfo>> getAppInfo(final ServerWebExchange exchange) { | ||
return Mono.just(new AppInfo().projectVersion(buildProperties.getVersion())) | ||
return Mono.just(new AppInfo() | ||
.projectVersion(buildProperties.getVersion()) | ||
.authType(authType)) | ||
.map(ResponseEntity::ok); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters