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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy