File tree Expand file tree Collapse file tree
src/main/java/cn/authing/sdk/java Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77 <groupId >cn.authing</groupId >
88 <artifactId >authing-java-sdk</artifactId >
9- <version >3.1.4 </version >
9+ <version >3.1.5 </version >
1010
1111 <name >Authing Java SDK</name >
1212 <description >java backend sdk for authing</description >
Original file line number Diff line number Diff line change @@ -388,6 +388,11 @@ public String buildAuthorizeUrl(IOidcParams params) {
388388 map .put ("prompt" , params .getScope () != null && params .getScope ().contains ("offline_access" ) ? "consent"
389389 : null );
390390 }
391+
392+ if (StrUtil .isNotBlank (params .getTenantId ())) {
393+ map .put ("tenant_id" , params .getTenantId ());
394+ }
395+
391396 return HttpUtils .buildUrlWithQueryParams (options .getAppHost () + "/oidc/auth" , map );
392397 }
393398
@@ -461,6 +466,10 @@ public String buildAuthorizeUrl(IOauthParams params) {
461466 params .getScope () != null && params .getScope ().contains ("offline_access" ) ? "consent"
462467 : null );
463468
469+ if (StrUtil .isNotBlank (params .getTenantId ())) {
470+ map .put ("tenant_id" , params .getTenantId ());
471+ }
472+
464473 return HttpUtils .buildUrlWithQueryParams (options .getAppHost () + "/oidc/auth" , map );
465474 }
466475
Original file line number Diff line number Diff line change @@ -45,6 +45,12 @@ public class AccessToken {
4545 @ JsonProperty ("aud" )
4646 private String aud ;
4747
48+ /**
49+ * 租户 ID
50+ */
51+ @ JsonProperty ("tenant_id" )
52+ private String tenantId ;
53+
4854 public String getJti () {
4955 return jti ;
5056 }
@@ -100,4 +106,12 @@ public String getAud() {
100106 public void setAud (String aud ) {
101107 this .aud = aud ;
102108 }
109+
110+ public String getTenantId () {
111+ return tenantId ;
112+ }
113+
114+ public void setTenantId (String tenantId ) {
115+ this .tenantId = tenantId ;
116+ }
103117}
Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ public class IOauthParams {
99
1010 private String redirectUri ;
1111
12+ /**
13+ * Tenant ID, optional field
14+ */
15+ private String tenantId ;
16+
1217 public String getScope () {
1318 return scope ;
1419 }
@@ -40,4 +45,12 @@ public String getRedirectUri() {
4045 public void setRedirectUri (String redirectUri ) {
4146 this .redirectUri = redirectUri ;
4247 }
48+
49+ public String getTenantId () {
50+ return tenantId ;
51+ }
52+
53+ public void setTenantId (String tenantId ) {
54+ this .tenantId = tenantId ;
55+ }
4356}
Original file line number Diff line number Diff line change @@ -17,6 +17,11 @@ public class IOidcParams {
1717
1818 private String prompt ;
1919
20+ /**
21+ * Tenant ID, optional field
22+ */
23+ private String tenantId ;
24+
2025 public String getScope () {
2126 return scope ;
2227 }
@@ -72,4 +77,12 @@ public void setPrompt(String prompt) {
7277 public String getPrompt () {
7378 return prompt ;
7479 }
80+
81+ public String getTenantId () {
82+ return tenantId ;
83+ }
84+
85+ public void setTenantId (String tenantId ) {
86+ this .tenantId = tenantId ;
87+ }
7588}
You can’t perform that action at this time.
0 commit comments