Skip to content

Commit 678c32a

Browse files
author
th37rose
committed
Added scope mapping for generic auth.
1 parent 4c9dd6a commit 678c32a

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/auth/Oauth2GenericAuthConfig.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ public class Oauth2GenericAuthConfig extends Oauth2SimpleAuthConfig {
1515
private String authorizationEndpoint;
1616
private String tokenEndpoint;
1717
private String userInfoEndpoint;
18+
private String scope;
1819
}

server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/dto/AuthConfigRequest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public boolean isEnableRegister() {
3434
*/
3535
@Nullable
3636
public String getIssuerUri() {
37-
return getString("issuer");
37+
return getString("issuerUri");
3838
}
3939

4040
@Nullable
@@ -67,6 +67,11 @@ public String getClientSecret() {
6767
return getString("clientSecret");
6868
}
6969

70+
@Nullable
71+
public String getScope() {
72+
return getString("scope");
73+
}
74+
7075
public String getSource(String defaultValue) {
7176
String source = getString("source");
7277
if (StringUtils.isNotBlank(source)) {

server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/service/factory/AuthConfigFactoryImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ private Oauth2SimpleAuthConfig buildOauth2GenericAuthConfig(AuthConfigRequest au
112112
.authorizationEndpoint(authConfigRequest.getAuthorizationEndpoint())
113113
.tokenEndpoint(authConfigRequest.getTokenEndpoint())
114114
.userInfoEndpoint(authConfigRequest.getUserInfoEndpoint())
115+
.scope(authConfigRequest.getScope())
115116
.authType(AuthTypeConstants.GENERIC)
116117
.build();
117118
}

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