diff --git a/obp-api/src/main/resources/props/sample.props.template b/obp-api/src/main/resources/props/sample.props.template
index dc558759a..8bc5aa02c 100644
--- a/obp-api/src/main/resources/props/sample.props.template
+++ b/obp-api/src/main/resources/props/sample.props.template
@@ -569,15 +569,16 @@ webui_oauth_1_documentation_url =
# Link to OAuth 2.0 glossary on api explorer
webui_oauth_2_documentation_url =
-# Link to Privacy Policy on signup page
-#webui_signup_form_submit_button_value=
-#webui_signup_form_title_text=Sign Up
-#webui_signup_body_password_repeat_text=Repeat
-#allow_pre_filled_password=true
-#webui_agree_terms_html=
Tesobe will use your information as set out in our privacy notice
+# Sign up functionality removed - users are directed to OBP Portal for registration
+# The following signup-related properties are no longer used:
+# - webui_signup_form_submit_button_value (signup form submit button text)
+# - webui_signup_form_title_text (signup form title)
+# - webui_signup_body_password_repeat_text (password repeat field text)
+# - allow_pre_filled_password (pre-filled password functionality)
+# - webui_agree_terms_html (terms agreement checkbox HTML)
+# - webui_agree_privacy_policy_url (privacy policy URL for signup)
+# - webui_agree_privacy_policy_html_text (privacy policy agreement text)
+# - webui_legal_notice_html_text (legal notice for signup forms)
## For partner logos and links
webui_main_partners=[\
@@ -596,8 +597,8 @@ webui_main_style_sheet = /media/css/website.css
# Override certain elements (with important styles)
webui_override_style_sheet =
-## Link to agree to Terms & Conditions, shown on signup page
-webui_agree_terms_url =
+## Link to agree to Terms & Conditions (no longer used - signup removed)
+# webui_agree_terms_url =
## The Support Email, shown in the bottom page
#webui_support_email=contact@openbankproject.com
@@ -625,6 +626,9 @@ webui_agree_terms_url =
#webui_post_consumer_registration_submit_button_value=Register consumer
# OBP Portal URL - base URL for the OBP Portal service
+# Used for:
+# - User registration: {webui_obp_portal_url}/register (all "Register" links redirect here)
+# - Consumer registration: {webui_obp_portal_url}/consumer-registration (default)
webui_obp_portal_url = http://localhost:5174
# External Consumer Registration URL - used to redirect "Get API Key" links to an external service
diff --git a/obp-api/src/main/scala/code/api/util/Glossary.scala b/obp-api/src/main/scala/code/api/util/Glossary.scala
index 79d3ff77c..b0c0dc2ca 100644
--- a/obp-api/src/main/scala/code/api/util/Glossary.scala
+++ b/obp-api/src/main/scala/code/api/util/Glossary.scala
@@ -1095,7 +1095,7 @@ object Glossary extends MdcLoggable {
|
|### 1) Get your App key
|
- |[Sign up]($getServerUrl/user_mgt/sign_up) or [login]($getServerUrl/user_mgt/login) as a developer.
+ |[Sign up](${APIUtil.getPropsValue("webui_obp_portal_url", "http://localhost:5174")}/register) or [login]($getServerUrl/user_mgt/login) as a developer.
|
|Register your App key [HERE](${getConsumerRegistrationUrl()})
|
@@ -2151,7 +2151,7 @@ object Glossary extends MdcLoggable {
|
|### Step 1: Get your App key
|
- |[Sign up]($getServerUrl/user_mgt/sign_up) or [login]($getServerUrl/user_mgt/login) as a developer
+ |[Sign up](${APIUtil.getPropsValue("webui_obp_portal_url", "http://localhost:5174")}/register) or [login]($getServerUrl/user_mgt/login) as a developer
|
|Register your App key [HERE](${getConsumerRegistrationUrl()})
|
@@ -2800,7 +2800,7 @@ object Glossary extends MdcLoggable {
|
|## In order to get an App / Consumer key
|
-|[Sign up]($getServerUrl/user_mgt/sign_up) or [login]($getServerUrl/user_mgt/login) as a developer.
+|[Sign up](${APIUtil.getPropsValue("webui_obp_portal_url", "http://localhost:5174")}/register) or [login]($getServerUrl/user_mgt/login) as a developer.
|
|Register your App / Consumer [HERE](${getConsumerRegistrationUrl()})
|
diff --git a/obp-api/src/main/scala/code/model/dataAccess/AuthUser.scala b/obp-api/src/main/scala/code/model/dataAccess/AuthUser.scala
index 0d8a462f9..ee6d171a3 100644
--- a/obp-api/src/main/scala/code/model/dataAccess/AuthUser.scala
+++ b/obp-api/src/main/scala/code/model/dataAccess/AuthUser.scala
@@ -229,7 +229,7 @@ class AuthUser extends MegaProtoUser[AuthUser] with CreatedUpdated with MdcLogga
override lazy val password = new MyPasswordNew
- lazy val signupPasswordRepeatText = getWebUiPropsValue("webui_signup_body_password_repeat_text", S.?("repeat"))
+ // Removed signup password repeat text - not needed with OBP Portal redirect
class MyPasswordNew extends MappedPassword(this) {
lazy val preFilledPassword = if (APIUtil.getPropsAsBoolValue("allow_pre_filled_password", true)) {get.toString} else ""
@@ -238,14 +238,9 @@ class AuthUser extends MegaProtoUser[AuthUser] with CreatedUpdated with MdcLogga
Full(
{appendFieldId( ) }
-
+
-
{signupPasswordRepeatText}
-
-
-
-
)
}
}
@@ -429,7 +424,6 @@ import net.liftweb.util.Helpers._
override def screenWrap = Full()
// define the order fields will appear in forms and output
override def fieldOrder = List(id, firstName, lastName, email, username, password, provider)
- override def signupFields = List(firstName, lastName, email, username, password)
// To force validation of email addresses set this to false (default as of 29 June 2021)
override def skipEmailValidation = APIUtil.getPropsAsBoolValue("authUser.skipEmailValidation", false)
@@ -698,28 +692,7 @@ import net.liftweb.util.Helpers._
case _ => S.error(S.?("invalid.validation.link")); S.redirectTo(homePage)
}
- override def actionsAfterSignup(theUser: TheUserType, func: () => Nothing): Nothing = {
- theUser.setValidated(skipEmailValidation).resetUniqueId()
- theUser.save
- val privacyPolicyValue: String = getWebUiPropsValue("webui_privacy_policy", "")
- val termsAndConditionsValue: String = getWebUiPropsValue("webui_terms_and_conditions", "")
- // User Agreement table
- UserAgreementProvider.userAgreementProvider.vend.createUserAgreement(
- theUser.user.foreign.map(_.userId).getOrElse(""), "privacy_conditions", privacyPolicyValue)
- UserAgreementProvider.userAgreementProvider.vend.createUserAgreement(
- theUser.user.foreign.map(_.userId).getOrElse(""), "terms_and_conditions", termsAndConditionsValue)
- if (!skipEmailValidation) {
- sendValidationEmail(theUser)
- S.notice(S.?("sign.up.message"))
- func()
- } else {
- grantDefaultEntitlementsToAuthUser(theUser)
- logUserIn(theUser, () => {
- S.notice(S.?("welcome"))
- func()
- })
- }
- }
+
/**
* Set this to redirect to a certain page after a failed login
*/
@@ -728,87 +701,9 @@ import net.liftweb.util.Helpers._
}
- def agreeTermsDiv = {
- val webUi = new WebUI
- val webUiPropsValue = getWebUiPropsValue("webui_terms_and_conditions", "")
- val termsAndConditionsCheckboxTitle = Helper.i18n("terms_and_conditions_checkbox_text", Some("I agree to the above Terms and Conditions"))
- val termsAndConditionsCheckboxLabel = Helper.i18n("terms_and_conditions_checkbox_label", Some("Terms and Conditions"))
- val agreeTermsHtml = s"""
- |
- }
+ // Removed signup-related methods: agreeTermsDiv, legalNoticeDiv, agreePrivacyPolicy
+ // These were only used in signup forms which now redirect to OBP Portal
+ // Signup functionality removed - users are directed to OBP Portal for registration
override def localForm(user: TheUserType, ignorePassword: Boolean, fields: List[FieldPointerType]): NodeSeq = {
@@ -818,18 +713,11 @@ import net.liftweb.util.Helpers._
if field.show_? && (!ignorePassword || !pointer.isPasswordField_?)
form <- field.toForm.toList
} yield {
- if(field.uniqueFieldId.getOrElse("") == "authuser_password") {
-
-
- {form}
-
- } else {
-
-
- {form}
-
-
- }
+
+
+ {form}
+
+
}
}
@@ -1610,67 +1498,8 @@ def restoreSomeSessions(): Unit = {
val usernames: List[String] = this.getResourceUsersByEmail(email).map(_.user.name)
findAll(ByList(this.username, usernames))
}
- def signupSubmitButtonValue() = getWebUiPropsValue("webui_signup_form_submit_button_value", S.?("sign.up"))
- //overridden to allow redirect to loginRedirect after signup. This is mostly to allow
- // loginFirst menu items to work if the user doesn't have an account. Without this,
- // if a user tries to access a logged-in only page, and then signs up, they don't get redirected
- // back to the proper page.
- override def signup = {
- val theUser: TheUserType = mutateUserOnSignup(createNewUserInstance())
- val theName = signUpPath.mkString("")
- //Check the internal redirect, in case for open redirect issue.
- // variable redir is from loginRedirect, it is set-up in OAuthAuthorisation.scala as following code:
- // val currentUrl = ObpS.uriAndQueryString.getOrElse("/")
- // AuthUser.loginRedirect.set(Full(Helpers.appendParams(currentUrl, List((LogUserOutParam, "false")))))
- val loginRedirectSave = loginRedirect.is
-
- def testSignup() {
- validateSignup(theUser) match {
- case Nil =>
- //here we check loginRedirectSave (different from implementation in super class)
- val redir = loginRedirectSave match {
- case Full(url) =>
- loginRedirect(Empty)
- url
- case _ =>
- //if the register page url (user_mgt/sign_up?after-signup=link-to-customer) contains the parameter
- //after-signup=link-to-customer,then it will redirect to the on boarding customer page.
- ObpS.param("after-signup") match {
- case url if (url.equals("link-to-customer")) =>
- "/add-user-auth-context-update-request"
- case _ =>
- homePage
- }
- }
- if (Helper.isValidInternalRedirectUrl(redir.toString)) {
- actionsAfterSignup(theUser, () => {
- S.redirectTo(redir)
- })
- } else {
- S.error(S.?(ErrorMessages.InvalidInternalRedirectUrl))
- logger.info(ErrorMessages.InvalidInternalRedirectUrl + loginRedirect.get)
- }
-
- case xs =>
- xs.foreach{
- e => S.error(e.field.uniqueFieldId.openOrThrowException("There is no uniqueFieldId."), e.msg)
- }
- signupFunc(Full(innerSignup _))
- }
- }
-
- def innerSignup = {
- val bind = "type=submit" #> signupSubmitButton(signupSubmitButtonValue(), testSignup _)
- bind(signupXhtml(theUser))
- }
-
- if(APIUtil.getPropsAsBoolValue("user_invitation.mandatory", false))
- S.redirectTo("/user-invitation-info")
- else
- innerSignup
- }
def scrambleAuthUser(userPrimaryKey: UserPrimaryKey): Box[Boolean] = tryo {
AuthUser.find(By(AuthUser.user, userPrimaryKey.value)) match {
diff --git a/obp-api/src/main/scala/code/snippet/Login.scala b/obp-api/src/main/scala/code/snippet/Login.scala
index a7c6a36c3..1ae8ce83b 100644
--- a/obp-api/src/main/scala/code/snippet/Login.scala
+++ b/obp-api/src/main/scala/code/snippet/Login.scala
@@ -70,8 +70,11 @@ class Login {
href getOrElse "#"
} & {
".signup [href]" #> {
- AuthUser.signUpPath.foldLeft("")(_ + "/" + _)
- }
+ val portalUrl = getWebUiPropsValue("webui_obp_portal_url", "http://localhost:5174")
+ s"$portalUrl/register"
+ } &
+ ".signup [target]" #> "_blank" &
+ ".signup [rel]" #> "noopener"
}
}
}
diff --git a/obp-api/src/main/scala/code/snippet/OAuthAuthorisation.scala b/obp-api/src/main/scala/code/snippet/OAuthAuthorisation.scala
index 66a598627..be038b035 100644
--- a/obp-api/src/main/scala/code/snippet/OAuthAuthorisation.scala
+++ b/obp-api/src/main/scala/code/snippet/OAuthAuthorisation.scala
@@ -46,6 +46,7 @@ import net.liftweb.http.S
import net.liftweb.util.Helpers._
import net.liftweb.util.{CssSel, Helpers, Props}
import code.api.oauth1a.OauthParams._
+import code.webuiprops.MappedWebUiPropsProvider.getWebUiPropsValue
import scala.xml.NodeSeq
@@ -150,8 +151,12 @@ object OAuthAuthorisation {
href getOrElse "#"
} &
- ".signup [href]" #>
- AuthUser.signUpPath.foldLeft("")(_ + "/" + _)
+ ".signup [href]" #> {
+ val portalUrl = getWebUiPropsValue("webui_obp_portal_url", "http://localhost:5174")
+ s"$portalUrl/register"
+ } &
+ ".signup [target]" #> "_blank" &
+ ".signup [rel]" #> "noopener"
}
}
case _ => error("Application not found")
diff --git a/obp-api/src/main/scala/code/snippet/WebUI.scala b/obp-api/src/main/scala/code/snippet/WebUI.scala
index d732bbec2..c741558c5 100644
--- a/obp-api/src/main/scala/code/snippet/WebUI.scala
+++ b/obp-api/src/main/scala/code/snippet/WebUI.scala
@@ -550,8 +550,21 @@ class WebUI extends MdcLoggable{
def userIsLoggedIn: CssSel = {
if(AuthUser.loggedIn_?)
"#register-link [href]" #> scala.xml.Unparsed(s"/already-logged-in")
- else
- "#register-link [href]" #> scala.xml.Unparsed(s"/user_mgt/sign_up")
+ else {
+ val portalUrl = getWebUiPropsValue("webui_obp_portal_url", "http://localhost:5174")
+ val registerUrl = s"$portalUrl/register"
+ "#register-link [href]" #> scala.xml.Unparsed(registerUrl) &
+ "#register-link [target]" #> "_blank" &
+ "#register-link [rel]" #> "noopener"
+ }
+ }
+
+ def portalRegisterLink: CssSel = {
+ val portalUrl = getWebUiPropsValue("webui_obp_portal_url", "http://localhost:5174")
+ val registerUrl = s"$portalUrl/register"
+ "a [href]" #> scala.xml.Unparsed(registerUrl) &
+ "a [target]" #> "_blank" &
+ "a [rel]" #> "noopener"
}
def alreadyLoggedIn: CssSel = {
diff --git a/obp-api/src/main/webapp/index-en.html b/obp-api/src/main/webapp/index-en.html
index a0dd0210c..32075b8b4 100644
--- a/obp-api/src/main/webapp/index-en.html
+++ b/obp-api/src/main/webapp/index-en.html
@@ -59,7 +59,7 @@ Berlin 13359, Germany
Create an account
-
First, create a free developer account on this sandbox and request a developer key. You will be asked to submit basic information about your app at this stage. Register for an account
+
diff --git a/obp-api/src/main/webapp/index.html b/obp-api/src/main/webapp/index.html
index 54b4d75a3..92fabd6ba 100644
--- a/obp-api/src/main/webapp/index.html
+++ b/obp-api/src/main/webapp/index.html
@@ -59,7 +59,7 @@ Berlin 13359, Germany
Create an account
-
First, create a free developer account on this sandbox and request a developer key. You will be asked to submit basic information about your app at this stage. Register for an account
+