Content-Length: 272200 | pFad | http://github.com/lowcoder-org/lowcoder/commit/22896e8e2f00e99295a99f671f76123602c67617

8B Merge pull request #1501 from lowcoder-org/feature/auth_header_of_query · lowcoder-org/lowcoder@22896e8 · GitHub
Skip to content

Commit 22896e8

Browse files
authored
Merge pull request #1501 from lowcoder-org/feature/auth_header_of_query
Authentication Type default value added for datasource
2 parents 59324cd + 5b08e71 commit 22896e8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/query/ApplicationQueryApiServiceImpl.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,15 @@ protected Mono<List<Property>> getAuthParamsAndHeadersInheritFromLogin(User user
196196
if(authId == null) {
197197
return Mono.empty();
198198
}
199+
200+
String filterAuthId;
201+
if(StringUtils.isEmpty(authId)) filterAuthId = user.getActiveAuthId();
202+
else {
203+
filterAuthId = authId;
204+
}
199205
Optional<Connection> activeConnectionOptional = user.getConnections()
200206
.stream()
201-
.filter(connection -> connection.getAuthId().equals(authId))
207+
.filter(connection -> connection.getAuthId().equals(filterAuthId))
202208
.findFirst();
203209
if(!activeConnectionOptional.isPresent() || activeConnectionOptional.get().getAuthConnectionAuthToken() == null) {
204210
return Mono.empty();

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/lowcoder-org/lowcoder/commit/22896e8e2f00e99295a99f671f76123602c67617

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy