From 32a5bd4fb73d195926766d7d5cca41bcee0316a6 Mon Sep 17 00:00:00 2001 From: "Crystal.Sea" Date: Sat, 29 May 2021 23:58:53 +0800 Subject: [PATCH] Single Sign-On fixed Single Sign-On fixed --- .../cas/endpoint/CasAuthorizeEndpoint.java | 4 +- .../endpoint/ExtendApiAuthorizeEndpoint.java | 11 +-- .../adapter/ExtendApiCndnsApiMailAdapter.java | 16 ++-- .../adapter/ExtendApiQQExmailAdapter.java | 11 ++- .../ExtendApiTimestampSignAdapter.java | 11 ++- .../adapter/ExtendApiZentaoAdapter.java | 23 ++--- .../templates/add-html-body-content.vm | 2 + .../templates/add-html-head-content.vm | 6 ++ .../src/main/resources/templates/readme.txt | 11 +++ .../resources/templates/saml1-post-binding.vm | 41 ++++++++ .../templates/saml2-post-artifact-binding.vm | 41 ++++++++ .../resources/templates/saml2-post-binding.vm | 40 ++++++++ .../saml2-post-simplesign-binding.vm | 50 ++++++++++ .../authorize/app_password_protected.ftl | 4 +- .../views/authorize/authorize_common.ftl | 17 ++++ .../views/authorize/cas_sso_submint.ftl | 22 +++++ .../authorize/desktop_qq_sso_execute.ftl | 93 ------------------- .../views/authorize/desktop_sso_execute.ftl | 19 ---- .../formbased_163email_sso_submint.ftl | 4 +- .../views/authorize/formbased_common.ftl | 12 --- .../formbased_qq_exmail_sso_submint.ftl | 67 ------------- .../formbased_redirect_post_submint.ftl | 4 +- .../authorize/formbased_redirect_submint.ftl | 4 +- .../views/authorize/formbased_sso_submint.ftl | 4 +- .../formbased_wy_youdao_sso_submint.ftl | 15 +-- .../views/authorize/init_sso_credential.ftl | 4 +- .../views/authorize/jwt_sso_submint.ftl | 8 +- .../authorize/oauth_access_confirmation.ftl | 2 +- .../views/authorize/redirect_sso_submit.ftl | 22 +++++ .../authorize/tokenbased_sso_submint.ftl | 7 +- .../templates/views/layout/footer.ftl | 6 +- 31 files changed, 323 insertions(+), 258 deletions(-) create mode 100644 maxkey-web-maxkey/src/main/resources/templates/add-html-body-content.vm create mode 100644 maxkey-web-maxkey/src/main/resources/templates/add-html-head-content.vm create mode 100644 maxkey-web-maxkey/src/main/resources/templates/readme.txt create mode 100644 maxkey-web-maxkey/src/main/resources/templates/saml1-post-binding.vm create mode 100644 maxkey-web-maxkey/src/main/resources/templates/saml2-post-artifact-binding.vm create mode 100644 maxkey-web-maxkey/src/main/resources/templates/saml2-post-binding.vm create mode 100644 maxkey-web-maxkey/src/main/resources/templates/saml2-post-simplesign-binding.vm create mode 100644 maxkey-web-maxkey/src/main/resources/templates/views/authorize/authorize_common.ftl create mode 100644 maxkey-web-maxkey/src/main/resources/templates/views/authorize/cas_sso_submint.ftl delete mode 100644 maxkey-web-maxkey/src/main/resources/templates/views/authorize/desktop_qq_sso_execute.ftl delete mode 100644 maxkey-web-maxkey/src/main/resources/templates/views/authorize/desktop_sso_execute.ftl delete mode 100644 maxkey-web-maxkey/src/main/resources/templates/views/authorize/formbased_common.ftl delete mode 100644 maxkey-web-maxkey/src/main/resources/templates/views/authorize/formbased_qq_exmail_sso_submint.ftl create mode 100644 maxkey-web-maxkey/src/main/resources/templates/views/authorize/redirect_sso_submit.ftl diff --git a/maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/CasAuthorizeEndpoint.java b/maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/CasAuthorizeEndpoint.java index 09a72d90a..8113edf20 100644 --- a/maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/CasAuthorizeEndpoint.java +++ b/maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/CasAuthorizeEndpoint.java @@ -146,7 +146,9 @@ public class CasAuthorizeEndpoint extends CasBaseAuthorizeEndpoint{ _logger.debug("redirect to CAS Client URL " + callbackUrl); - return WebContext.redirect(callbackUrl.toString()); + ModelAndView modelAndView=new ModelAndView("authorize/cas_sso_submint"); + modelAndView.addObject("callbackUrl", callbackUrl.toString()); + return modelAndView; } /** diff --git a/maxkey-protocols/maxkey-protocol-extendapi/src/main/java/org/maxkey/authz/exapi/endpoint/ExtendApiAuthorizeEndpoint.java b/maxkey-protocols/maxkey-protocol-extendapi/src/main/java/org/maxkey/authz/exapi/endpoint/ExtendApiAuthorizeEndpoint.java index 7ae567b3d..f43c6efab 100644 --- a/maxkey-protocols/maxkey-protocol-extendapi/src/main/java/org/maxkey/authz/exapi/endpoint/ExtendApiAuthorizeEndpoint.java +++ b/maxkey-protocols/maxkey-protocol-extendapi/src/main/java/org/maxkey/authz/exapi/endpoint/ExtendApiAuthorizeEndpoint.java @@ -51,10 +51,10 @@ public class ExtendApiAuthorizeEndpoint extends AuthorizeBaseEndpoint{ @ApiOperation(value = "ExtendApi认证地址接口", notes = "参数应用ID",httpMethod="GET") @RequestMapping("/authz/api/{id}") public ModelAndView authorize(HttpServletRequest request,@PathVariable("id") String id){ - + + ModelAndView modelAndView=new ModelAndView("authorize/redirect_sso_submit"); Apps apps=getApp(id); _logger.debug(""+apps); - if(Boolean.isTrue(apps.getIsAdapter())){ Accounts appUser=getAccounts(apps); @@ -62,8 +62,6 @@ public class ExtendApiAuthorizeEndpoint extends AuthorizeBaseEndpoint{ return generateInitCredentialModelAndView(id,"/authorize/api/"+id); } - ModelAndView modelAndView=new ModelAndView(); - AbstractAuthorizeAdapter adapter =(AbstractAuthorizeAdapter)Instance.newInstance(apps.getAdapter()); apps.setAppUser(appUser); @@ -75,8 +73,9 @@ public class ExtendApiAuthorizeEndpoint extends AuthorizeBaseEndpoint{ modelAndView); return modelAndView; }else{ - String redirec_uri=getApp(id).getLoginUrl(); - return WebContext.redirect(redirec_uri); + modelAndView.addObject("redirect_uri", getApp(id).getLoginUrl()); + + return modelAndView; } } diff --git a/maxkey-protocols/maxkey-protocol-extendapi/src/main/java/org/maxkey/authz/exapi/endpoint/adapter/ExtendApiCndnsApiMailAdapter.java b/maxkey-protocols/maxkey-protocol-extendapi/src/main/java/org/maxkey/authz/exapi/endpoint/adapter/ExtendApiCndnsApiMailAdapter.java index 3fa8c62f6..d86659e6e 100644 --- a/maxkey-protocols/maxkey-protocol-extendapi/src/main/java/org/maxkey/authz/exapi/endpoint/adapter/ExtendApiCndnsApiMailAdapter.java +++ b/maxkey-protocols/maxkey-protocol-extendapi/src/main/java/org/maxkey/authz/exapi/endpoint/adapter/ExtendApiCndnsApiMailAdapter.java @@ -19,19 +19,16 @@ package org.maxkey.authz.exapi.endpoint.adapter; import java.time.Instant; import java.util.HashMap; - import org.maxkey.authn.SigninPrincipal; import org.maxkey.authz.endpoint.adapter.AbstractAuthorizeAdapter; import org.maxkey.client.http.HttpVerb; import org.maxkey.client.oauth.OAuthClient; -import org.maxkey.client.oauth.model.Token; import org.maxkey.crypto.DigestUtils; import org.maxkey.entity.ExtraAttrs; import org.maxkey.entity.UserInfo; import org.maxkey.entity.apps.Apps; import org.maxkey.util.HttpsTrusts; import org.maxkey.util.JsonUtils; -import org.maxkey.web.WebContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.servlet.ModelAndView; @@ -90,7 +87,7 @@ public class ExtendApiCndnsApiMailAdapter extends AbstractAuthorizeAdapter { String tokenMd5 =DigestUtils.md5Hex(details.getCredentials()); HashMap requestParamenter =new HashMap(); - String redirec_uri = ""; + String redirect_uri = ""; if(action.equalsIgnoreCase("getDomailUrl")) { String sign =DigestUtils.md5Hex (String.format( @@ -102,7 +99,7 @@ public class ExtendApiCndnsApiMailAdapter extends AbstractAuthorizeAdapter { authkeyRestClient.addRestObject(requestParamenter); HashMap authKey=JsonUtils.gson2Object(authkeyRestClient.execute().getBody(), HashMap.class); - redirec_uri=authKey.get("adminUrl"); + redirect_uri=authKey.get("adminUrl"); }else { String sign =DigestUtils.md5Hex @@ -115,11 +112,14 @@ public class ExtendApiCndnsApiMailAdapter extends AbstractAuthorizeAdapter { authkeyRestClient.addRestObject(requestParamenter); HashMap authKey=JsonUtils.gson2Object(authkeyRestClient.execute().getBody(), HashMap.class); - redirec_uri=authKey.get("webmailUrl"); + redirect_uri=authKey.get("webmailUrl"); } - _logger.debug("redirec_uri : "+redirec_uri); - return WebContext.redirect(redirec_uri); + _logger.debug("redirect_uri : "+redirect_uri); + + modelAndView.addObject("redirect_uri", redirect_uri); + + return modelAndView; } } diff --git a/maxkey-protocols/maxkey-protocol-extendapi/src/main/java/org/maxkey/authz/exapi/endpoint/adapter/ExtendApiQQExmailAdapter.java b/maxkey-protocols/maxkey-protocol-extendapi/src/main/java/org/maxkey/authz/exapi/endpoint/adapter/ExtendApiQQExmailAdapter.java index 495889728..13881eff8 100644 --- a/maxkey-protocols/maxkey-protocol-extendapi/src/main/java/org/maxkey/authz/exapi/endpoint/adapter/ExtendApiQQExmailAdapter.java +++ b/maxkey-protocols/maxkey-protocol-extendapi/src/main/java/org/maxkey/authz/exapi/endpoint/adapter/ExtendApiQQExmailAdapter.java @@ -18,7 +18,6 @@ package org.maxkey.authz.exapi.endpoint.adapter; import java.util.HashMap; - import org.maxkey.authn.SigninPrincipal; import org.maxkey.authz.endpoint.adapter.AbstractAuthorizeAdapter; import org.maxkey.client.oauth.OAuthClient; @@ -28,7 +27,6 @@ import org.maxkey.entity.UserInfo; import org.maxkey.entity.apps.Apps; import org.maxkey.util.HttpsTrusts; import org.maxkey.util.JsonUtils; -import org.maxkey.web.WebContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.servlet.ModelAndView; @@ -76,9 +74,12 @@ public class ExtendApiQQExmailAdapter extends AbstractAuthorizeAdapter { HashMap authKey=JsonUtils.gson2Object(authkeyRestClient.execute().getBody(), HashMap.class); _logger.debug("authKey : "+authKey); - String redirec_uri=authKey.get("login_url"); - _logger.debug("redirec_uri : "+redirec_uri); - return WebContext.redirect(redirec_uri); + String redirect_uri=authKey.get("login_url"); + _logger.debug("redirect_uri : "+redirect_uri); + + modelAndView.addObject("redirect_uri", redirect_uri); + + return modelAndView; } } diff --git a/maxkey-protocols/maxkey-protocol-extendapi/src/main/java/org/maxkey/authz/exapi/endpoint/adapter/ExtendApiTimestampSignAdapter.java b/maxkey-protocols/maxkey-protocol-extendapi/src/main/java/org/maxkey/authz/exapi/endpoint/adapter/ExtendApiTimestampSignAdapter.java index c63ee5d56..23f65509c 100644 --- a/maxkey-protocols/maxkey-protocol-extendapi/src/main/java/org/maxkey/authz/exapi/endpoint/adapter/ExtendApiTimestampSignAdapter.java +++ b/maxkey-protocols/maxkey-protocol-extendapi/src/main/java/org/maxkey/authz/exapi/endpoint/adapter/ExtendApiTimestampSignAdapter.java @@ -24,7 +24,6 @@ import org.maxkey.crypto.DigestUtils; import org.maxkey.entity.ExtraAttrs; import org.maxkey.entity.UserInfo; import org.maxkey.entity.apps.Apps; -import org.maxkey.web.WebContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.servlet.ModelAndView; @@ -83,12 +82,14 @@ public class ExtendApiTimestampSignAdapter extends AbstractAuthorizeAdapter { _logger.debug(""+token); String account = userInfo.getUsername(); - String redirec_uri = String.format(details.getLoginUrl(),account,code,timestamp,token); + String redirect_uri = String.format(details.getLoginUrl(),account,code,timestamp,token); + _logger.debug("redirect_uri : "+redirect_uri); - _logger.debug("redirec_uri : "+redirec_uri); - - return WebContext.redirect(redirec_uri); + modelAndView.addObject("redirect_uri", redirect_uri); + + return modelAndView; + } } \ No newline at end of file diff --git a/maxkey-protocols/maxkey-protocol-extendapi/src/main/java/org/maxkey/authz/exapi/endpoint/adapter/ExtendApiZentaoAdapter.java b/maxkey-protocols/maxkey-protocol-extendapi/src/main/java/org/maxkey/authz/exapi/endpoint/adapter/ExtendApiZentaoAdapter.java index 7bcf525a6..0fa621569 100644 --- a/maxkey-protocols/maxkey-protocol-extendapi/src/main/java/org/maxkey/authz/exapi/endpoint/adapter/ExtendApiZentaoAdapter.java +++ b/maxkey-protocols/maxkey-protocol-extendapi/src/main/java/org/maxkey/authz/exapi/endpoint/adapter/ExtendApiZentaoAdapter.java @@ -24,7 +24,6 @@ import org.maxkey.crypto.DigestUtils; import org.maxkey.entity.ExtraAttrs; import org.maxkey.entity.UserInfo; import org.maxkey.entity.apps.Apps; -import org.maxkey.web.WebContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.servlet.ModelAndView; @@ -72,22 +71,24 @@ public class ExtendApiZentaoAdapter extends AbstractAuthorizeAdapter { _logger.debug(""+token); String account = userInfo.getUsername(); - String redirec_uri = details.getLoginUrl(); - if(redirec_uri.indexOf("api.php?")<0) { - if(redirec_uri.endsWith("/")) { - redirec_uri += String.format(login_url_template,account,code,time,token); + String redirect_uri = details.getLoginUrl(); + if(redirect_uri.indexOf("api.php?")<0) { + if(redirect_uri.endsWith("/")) { + redirect_uri += String.format(login_url_template,account,code,time,token); }else { - redirec_uri +="/" + String.format(login_url_template,account,code,time,token); + redirect_uri +="/" + String.format(login_url_template,account,code,time,token); } - }else if(redirec_uri.endsWith("&")){ - redirec_uri += String.format(login_url_m_template,account,code,time,token); + }else if(redirect_uri.endsWith("&")){ + redirect_uri += String.format(login_url_m_template,account,code,time,token); }else { - redirec_uri += "&" +String.format(login_url_m_template,account,code,time,token); + redirect_uri += "&" +String.format(login_url_m_template,account,code,time,token); } - _logger.debug("redirec_uri : "+redirec_uri); + _logger.debug("redirect_uri : "+redirect_uri); + modelAndView=new ModelAndView("authorize/redirect_sso_submit"); + modelAndView.addObject("redirect_uri", redirect_uri); - return WebContext.redirect(redirec_uri); + return modelAndView; } } diff --git a/maxkey-web-maxkey/src/main/resources/templates/add-html-body-content.vm b/maxkey-web-maxkey/src/main/resources/templates/add-html-body-content.vm new file mode 100644 index 000000000..6d5fc5abc --- /dev/null +++ b/maxkey-web-maxkey/src/main/resources/templates/add-html-body-content.vm @@ -0,0 +1,2 @@ +## Stub file that one can replace with Velocity template (and thus HTML) content +## to be placed into the sBODY section of the response \ No newline at end of file diff --git a/maxkey-web-maxkey/src/main/resources/templates/add-html-head-content.vm b/maxkey-web-maxkey/src/main/resources/templates/add-html-head-content.vm new file mode 100644 index 000000000..662976f76 --- /dev/null +++ b/maxkey-web-maxkey/src/main/resources/templates/add-html-head-content.vm @@ -0,0 +1,6 @@ +## Stub file that one can replace with Velocity template (and thus HTML) content +## to be placed into the HEAD section of the response + + \ No newline at end of file diff --git a/maxkey-web-maxkey/src/main/resources/templates/readme.txt b/maxkey-web-maxkey/src/main/resources/templates/readme.txt new file mode 100644 index 000000000..ecc910389 --- /dev/null +++ b/maxkey-web-maxkey/src/main/resources/templates/readme.txt @@ -0,0 +1,11 @@ +Velocity Template Language +Velocity is a Java-based template engine. +It permits anyone to use a simple yet powerful template language to reference objects defined in Java code. + +below vms is for opensaml +add-html-body-content.vm +add-html-head-content.vm +saml1-post-binding.vm +saml2-post-artifact-binding.vm +saml2-post-binding.vm +saml2-post-simplesign-binding.vm \ No newline at end of file diff --git a/maxkey-web-maxkey/src/main/resources/templates/saml1-post-binding.vm b/maxkey-web-maxkey/src/main/resources/templates/saml1-post-binding.vm new file mode 100644 index 000000000..f6266f86c --- /dev/null +++ b/maxkey-web-maxkey/src/main/resources/templates/saml1-post-binding.vm @@ -0,0 +1,41 @@ +## +## Velocity Template for SAML 1 HTTP-POST binding +## +## Velocity context may contain the following properties +## action - String - the action URL for the form +## binding - String - the SAML binding type in use +## TARGET - String - the relay state for the message +## SAMLResponse - String - the Base64 encoded SAML Response + + + + + #parse ( "/templates/add-html-head-content.vm" ) + + + + + +
+
+ #if($SAMLResponse)#end + + #if($TARGET)#end + +
+ +
+ + #parse ( "/templates/add-html-body-content.vm" ) + + + \ No newline at end of file diff --git a/maxkey-web-maxkey/src/main/resources/templates/saml2-post-artifact-binding.vm b/maxkey-web-maxkey/src/main/resources/templates/saml2-post-artifact-binding.vm new file mode 100644 index 000000000..48ba70fc6 --- /dev/null +++ b/maxkey-web-maxkey/src/main/resources/templates/saml2-post-artifact-binding.vm @@ -0,0 +1,41 @@ +## +## Velocity Template for SAML 2 HTTP-POST binding +## +## Velocity context may contain the following properties +## action - String - the action URL for the form +## binding - String - the SAML binding type in use +## RelayState - String - the relay state for the message +## SAMLArt - String - SAML 2 artifact + + + + + + + #parse ( "/templates/add-html-head-content.vm" ) + + + + +
+
+ #if($RelayState) + + #end + + +
+ +
+ #parse ( "/templates/add-html-body-content.vm" ) + + \ No newline at end of file diff --git a/maxkey-web-maxkey/src/main/resources/templates/saml2-post-binding.vm b/maxkey-web-maxkey/src/main/resources/templates/saml2-post-binding.vm new file mode 100644 index 000000000..b2f175013 --- /dev/null +++ b/maxkey-web-maxkey/src/main/resources/templates/saml2-post-binding.vm @@ -0,0 +1,40 @@ +## +## Velocity Template for SAML 2 HTTP-POST binding +## +## Velocity context may contain the following properties +## action - String - the action URL for the form +## binding - String - the SAML binding type in use +## RelayState - String - the relay state for the message +## SAMLRequest - String - the Base64 encoded SAML Request +## SAMLResponse - String - the Base64 encoded SAML Response + + + + #parse ( "/templates/add-html-head-content.vm" ) + + + + +
+
+ #if($RelayState)#end + + #if($SAMLRequest)#end + + #if($SAMLResponse)#end + +
+ +
+ #parse ( "/templates/add-html-body-content.vm" ) + + \ No newline at end of file diff --git a/maxkey-web-maxkey/src/main/resources/templates/saml2-post-simplesign-binding.vm b/maxkey-web-maxkey/src/main/resources/templates/saml2-post-simplesign-binding.vm new file mode 100644 index 000000000..49252f1e7 --- /dev/null +++ b/maxkey-web-maxkey/src/main/resources/templates/saml2-post-simplesign-binding.vm @@ -0,0 +1,50 @@ +## +## Velocity Template for SAML 2 HTTP-POST-SimpleSign binding +## +## Velocity context may contain the following properties +## action - String - the action URL for the form +## binding - String - the SAML binding type in use +## RelayState - String - the relay state for the message +## SAMLRequest - String - the Base64 encoded SAML Request +## SAMLResponse - String - the Base64 encoded SAML Response +## Signature - String - the Base64 encoded simple signature +## SigAlg - String - the signature algorithm URI +## KeyInfo - String - the Base64 encoded ds:KeyInfo (optional) + + + + #parse ( "/templates/add-html-head-content.vm" ) + + + + +
+
+ #if($RelayState)#end + + #if($SAMLRequest)#end + + #if($SAMLResponse)#end + + #if($Signature)#end + + #if($SigAlg)#end + + #if($KeyInfo)#end + +
+ +
+ #parse ( "/templates/add-html-body-content.vm" ) + + + \ No newline at end of file diff --git a/maxkey-web-maxkey/src/main/resources/templates/views/authorize/app_password_protected.ftl b/maxkey-web-maxkey/src/main/resources/templates/views/authorize/app_password_protected.ftl index 650875ff4..f0b1b2b0a 100644 --- a/maxkey-web-maxkey/src/main/resources/templates/views/authorize/app_password_protected.ftl +++ b/maxkey-web-maxkey/src/main/resources/templates/views/authorize/app_password_protected.ftl @@ -1,7 +1,7 @@ - + - <#include "formbased_common.ftl"> + <#include "authorize_common.ftl"> diff --git a/maxkey-web-maxkey/src/main/resources/templates/views/authorize/authorize_common.ftl b/maxkey-web-maxkey/src/main/resources/templates/views/authorize/authorize_common.ftl new file mode 100644 index 000000000..e006683ac --- /dev/null +++ b/maxkey-web-maxkey/src/main/resources/templates/views/authorize/authorize_common.ftl @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/maxkey-web-maxkey/src/main/resources/templates/views/authorize/cas_sso_submint.ftl b/maxkey-web-maxkey/src/main/resources/templates/views/authorize/cas_sso_submint.ftl new file mode 100644 index 000000000..6e4b7374c --- /dev/null +++ b/maxkey-web-maxkey/src/main/resources/templates/views/authorize/cas_sso_submint.ftl @@ -0,0 +1,22 @@ + + + + Central Authentication Service Single Sign-On + <#include "authorize_common.ftl"> + + + + +
+ + + + +
+
+ + diff --git a/maxkey-web-maxkey/src/main/resources/templates/views/authorize/desktop_qq_sso_execute.ftl b/maxkey-web-maxkey/src/main/resources/templates/views/authorize/desktop_qq_sso_execute.ftl deleted file mode 100644 index ae3b80862..000000000 --- a/maxkey-web-maxkey/src/main/resources/templates/views/authorize/desktop_qq_sso_execute.ftl +++ /dev/null @@ -1,93 +0,0 @@ - - - - <#include "formbased_common.ftl"> - - - - -
-
-
系统加载中,请勿操作电脑。。。
-
出现"是否停止运行此脚本?"的提示
- -
- - diff --git a/maxkey-web-maxkey/src/main/resources/templates/views/authorize/desktop_sso_execute.ftl b/maxkey-web-maxkey/src/main/resources/templates/views/authorize/desktop_sso_execute.ftl deleted file mode 100644 index 8ecb59014..000000000 --- a/maxkey-web-maxkey/src/main/resources/templates/views/authorize/desktop_sso_execute.ftl +++ /dev/null @@ -1,19 +0,0 @@ - - - - <#include "formbased_common.ftl"> - Desktop SSO Execute - - - - - - - - - diff --git a/maxkey-web-maxkey/src/main/resources/templates/views/authorize/formbased_163email_sso_submint.ftl b/maxkey-web-maxkey/src/main/resources/templates/views/authorize/formbased_163email_sso_submint.ftl index 7ceb5a309..52ba1a81d 100644 --- a/maxkey-web-maxkey/src/main/resources/templates/views/authorize/formbased_163email_sso_submint.ftl +++ b/maxkey-web-maxkey/src/main/resources/templates/views/authorize/formbased_163email_sso_submint.ftl @@ -1,6 +1,6 @@ - + - <#include "formbased_common.ftl"> + <#include "authorize_common.ftl"> - - - - - \ No newline at end of file diff --git a/maxkey-web-maxkey/src/main/resources/templates/views/authorize/formbased_qq_exmail_sso_submint.ftl b/maxkey-web-maxkey/src/main/resources/templates/views/authorize/formbased_qq_exmail_sso_submint.ftl deleted file mode 100644 index f1d3ee4f7..000000000 --- a/maxkey-web-maxkey/src/main/resources/templates/views/authorize/formbased_qq_exmail_sso_submint.ftl +++ /dev/null @@ -1,67 +0,0 @@ - - - - <#include "formbased_common.ftl"> - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - diff --git a/maxkey-web-maxkey/src/main/resources/templates/views/authorize/formbased_redirect_post_submint.ftl b/maxkey-web-maxkey/src/main/resources/templates/views/authorize/formbased_redirect_post_submint.ftl index 0fabbd4ab..c73536e93 100644 --- a/maxkey-web-maxkey/src/main/resources/templates/views/authorize/formbased_redirect_post_submint.ftl +++ b/maxkey-web-maxkey/src/main/resources/templates/views/authorize/formbased_redirect_post_submint.ftl @@ -1,7 +1,7 @@ - + - <#include "formbased_common.ftl"> + <#include "authorize_common.ftl"> + function redirectToLogin(){ + window.top.location.href ="https://note.youdao.com/login/acc/login?username=${username}&password=${password}&app=web&product=YNOTE&tp=urstoken&cf=2&fr=1&systemName=&deviceType=&ru=http://note.youdao.com/web/&er=http://note.youdao.com/web/?&systemName=Windows&deviceType=WindowsPC×tamp=${currentTime}"; + } + + - +
diff --git a/maxkey-web-maxkey/src/main/resources/templates/views/authorize/init_sso_credential.ftl b/maxkey-web-maxkey/src/main/resources/templates/views/authorize/init_sso_credential.ftl index 80b58e76b..d097ff283 100644 --- a/maxkey-web-maxkey/src/main/resources/templates/views/authorize/init_sso_credential.ftl +++ b/maxkey-web-maxkey/src/main/resources/templates/views/authorize/init_sso_credential.ftl @@ -1,7 +1,7 @@ - + - <#include "formbased_common.ftl"> + <#include "authorize_common.ftl"> SSO Credential Init diff --git a/maxkey-web-maxkey/src/main/resources/templates/views/authorize/jwt_sso_submint.ftl b/maxkey-web-maxkey/src/main/resources/templates/views/authorize/jwt_sso_submint.ftl index b014da4b3..c460cdf8a 100644 --- a/maxkey-web-maxkey/src/main/resources/templates/views/authorize/jwt_sso_submint.ftl +++ b/maxkey-web-maxkey/src/main/resources/templates/views/authorize/jwt_sso_submint.ftl @@ -1,13 +1,13 @@ - + - <#include "formbased_common.ftl"> - Token-Based SSO Submit + <#include "authorize_common.ftl"> + JWT Single Sign-On - +
diff --git a/maxkey-web-maxkey/src/main/resources/templates/views/authorize/oauth_access_confirmation.ftl b/maxkey-web-maxkey/src/main/resources/templates/views/authorize/oauth_access_confirmation.ftl index 3f29906f3..0f76e63bf 100644 --- a/maxkey-web-maxkey/src/main/resources/templates/views/authorize/oauth_access_confirmation.ftl +++ b/maxkey-web-maxkey/src/main/resources/templates/views/authorize/oauth_access_confirmation.ftl @@ -1,5 +1,5 @@ - + <#include "../layout/header.ftl"/> <#include "../layout/common.cssjs.ftl"/> diff --git a/maxkey-web-maxkey/src/main/resources/templates/views/authorize/redirect_sso_submit.ftl b/maxkey-web-maxkey/src/main/resources/templates/views/authorize/redirect_sso_submit.ftl new file mode 100644 index 000000000..04c445dba --- /dev/null +++ b/maxkey-web-maxkey/src/main/resources/templates/views/authorize/redirect_sso_submit.ftl @@ -0,0 +1,22 @@ + + + + Redirect Single Sign-On + <#include "authorize_common.ftl"> + + + + + +
token
+ + + +
+
+ + diff --git a/maxkey-web-maxkey/src/main/resources/templates/views/authorize/tokenbased_sso_submint.ftl b/maxkey-web-maxkey/src/main/resources/templates/views/authorize/tokenbased_sso_submint.ftl index 78b6964fa..3d269f449 100644 --- a/maxkey-web-maxkey/src/main/resources/templates/views/authorize/tokenbased_sso_submint.ftl +++ b/maxkey-web-maxkey/src/main/resources/templates/views/authorize/tokenbased_sso_submint.ftl @@ -1,9 +1,8 @@ - + - <#include "formbased_common.ftl"> - Token-Based SSO Submit - + Token-Based Single Sign-On + <#include "authorize_common.ftl"> diff --git a/maxkey-web-maxkey/src/main/resources/templates/views/layout/footer.ftl b/maxkey-web-maxkey/src/main/resources/templates/views/layout/footer.ftl index 56a2c58fe..898fe6bec 100644 --- a/maxkey-web-maxkey/src/main/resources/templates/views/layout/footer.ftl +++ b/maxkey-web-maxkey/src/main/resources/templates/views/layout/footer.ftl @@ -1,4 +1,4 @@ - <#-- footer --> +
@@ -17,8 +17,8 @@
- <#-- encryption certificate for login --> + -<#-- footer end --> \ No newline at end of file + \ No newline at end of file