File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
src/main/java/cn/authing/sdk/java/client Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 6
6
7
7
<groupId >cn.authing</groupId >
8
8
<artifactId >authing-java-sdk</artifactId >
9
- <version >3.1.5 </version >
9
+ <version >3.1.6 </version >
10
10
11
11
<name >Authing Java SDK</name >
12
12
<description >java backend sdk for authing</description >
Original file line number Diff line number Diff line change @@ -100,6 +100,10 @@ public AccessToken introspectAccessTokenOffline(String token) throws Exception {
100
100
}
101
101
102
102
public OIDCTokenResponse getAccessTokenByCode (String code ) throws Exception {
103
+ return this .getAccessTokenByCode (code , this .options .getRedirectUri ());
104
+ }
105
+
106
+ public OIDCTokenResponse getAccessTokenByCode (String code , String redirectUri ) throws Exception {
103
107
if ((StrUtil .isBlank (this .options .getAppId ()) || StrUtil .isBlank (this .options .getAppSecret ()))
104
108
&& this .options .getTokenEndPointAuthMethod () != AuthMethodEnum .NONE .getValue ()) {
105
109
throw new Exception ("请在初始化 AuthenticationClient 时传入 appId 和 secret 参数" );
@@ -113,7 +117,7 @@ public OIDCTokenResponse getAccessTokenByCode(String code) throws Exception {
113
117
}
114
118
115
119
CodeToTokenParams tokenParam = new CodeToTokenParams ();
116
- tokenParam .setRedirectUri (this . options . getRedirectUri () );
120
+ tokenParam .setRedirectUri (redirectUri );
117
121
tokenParam .setCode (code );
118
122
tokenParam .setGrantType ("authorization_code" );
119
123
You can’t perform that action at this time.
0 commit comments