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

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

+1
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
}

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

+6-1
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)) {

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

+1
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)