diff --git a/modules/distribution/src/assembly/bin.xml b/modules/distribution/src/assembly/bin.xml index 6446dd26..90800748 100644 --- a/modules/distribution/src/assembly/bin.xml +++ b/modules/distribution/src/assembly/bin.xml @@ -80,6 +80,7 @@ **/sso-idp-config.xml **/application-authentication.xml **/sso/jaggery.conf + **/sso/views/register_new_user.jag @@ -330,6 +331,7 @@ **/publisher/config/publisher-tenant.json **/sso/jaggery.conf + **/sso/views/register_new_user.jag @@ -574,6 +576,15 @@ + + src/sso + + ${pom.artifactId}-${pom.version}/repository/deployment/server/jaggeryapps/sso + + + **/* + + @@ -1119,12 +1130,5 @@ ${pom.artifactId}-${pom.version}/repository/deployment/server/jaggeryapps/publisher/config 644 - - - src/sso/jaggery.conf - ${pom.artifactId}-${pom.version}/repository/deployment/server/jaggeryapps/sso - true - - diff --git a/modules/distribution/src/sso/views/register_new_user.jag b/modules/distribution/src/sso/views/register_new_user.jag new file mode 100644 index 00000000..1a146890 --- /dev/null +++ b/modules/distribution/src/sso/views/register_new_user.jag @@ -0,0 +1,200 @@ +<% +/* + * Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +var configs = require('/config/sso.js').config(); +var e = request.getParameter('authFailure'); + +var log = new Log(); +var relyingParty = request.getParameter('relyingParty'); + +if(!request.isSecure()){ + response.content = { 'authFailure' : e , 'relyingParty' : relyingParty }; + response.sendRedirect(configs.server.https + request.getRequestURI()); +} + +//TODO: this should be fixed properly +if (relyingParty instanceof Array) { + relyingParty = relyingParty.pop(); +} +var signInUrl; + +if (relyingParty == 'publisher') { + signInUrl = configs.urls.publisher; +} else { + signInUrl = configs.urls.store + '/login?ignoreReferer=true'; +} + +var recoveryModule = require('account-management').recovery; +var challengeSet = recoveryModule.getChallengeQuestionSet(); +var isPasswordRecoveryEnabled = recoveryModule.isPasswordRecoveryEnabled(); +var themeModule = require('/modules/theme.js'); +%> + + + + + Sign in or Register | <% include(themeModule.getThemedUrl('includes/title.jag')); %> + + + + <% include(themeModule.getThemedUrl('includes/header_file_imports.jag')); %> + + +
+ <% include(themeModule.getThemedUrl('includes/header.jag')); %> +
+ + +
+
+ + <% include(themeModule.getThemedUrl('includes/footer_file_imports.jag')); %> + + + \ No newline at end of file