File tree Expand file tree Collapse file tree 3 files changed +17
-9
lines changed
src/main/java/cn/authing/sdk/java Expand file tree Collapse file tree 3 files changed +17
-9
lines changed 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.0 </version >
9+ <version >3.1.1 </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 2727import java .security .MessageDigest ;
2828import java .security .InvalidParameterException ;
2929import java .text .ParseException ;
30- import java .util .Base64 ;
31- import java .util .HashMap ;
32- import java .util .Map ;
33- import java .util .Optional ;
30+ import java .util .*;
3431
3532/**
3633 * @author ZKB
@@ -385,10 +382,12 @@ public String buildAuthorizeUrl(IOidcParams params) {
385382 map .put ("response_type" , Optional .ofNullable (params .getResponseType ()).orElse ("code" ));
386383 map .put ("redirect_uri" ,
387384 Optional .ofNullable (params .getRedirectUri ()).orElse (options .getRedirectUri ()));
388- map .put ("prompt" ,
389- params .getScope () != null && params .getScope ().contains ("offline_access" ) ? "consent"
390- : null );
391-
385+ if (!Objects .isNull (params .getPrompt ())) {
386+ map .put ("prompt" , params .getPrompt ());
387+ } else {
388+ map .put ("prompt" , params .getScope () != null && params .getScope ().contains ("offline_access" ) ? "consent"
389+ : null );
390+ }
392391 return HttpUtils .buildUrlWithQueryParams (options .getAppHost () + "/oidc/auth" , map );
393392 }
394393
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ public class IOidcParams {
1515
1616 private String redirectUri ;
1717
18+ private String prompt ;
19+
1820 public String getScope () {
1921 return scope ;
2022 }
@@ -63,4 +65,11 @@ public void setRedirectUri(String redirectUri) {
6365 this .redirectUri = redirectUri ;
6466 }
6567
68+ public void setPrompt (String prompt ) {
69+ this .prompt = prompt ;
70+ }
71+
72+ public String getPrompt () {
73+ return prompt ;
74+ }
6675}
You can’t perform that action at this time.
0 commit comments