From a3e2ef1afead700099635bd48ab07b8581e61e99 Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Wed, 19 Oct 2016 15:49:17 -0600 Subject: [PATCH 1/3] Make links to other pages relative Fixes #175. --- src/spEmailVerification.tpl.html | 2 +- src/spLoginForm.tpl.html | 2 +- src/spPasswordResetForm.tpl.html | 12 ++++++------ src/spPasswordResetRequestForm.tpl.html | 2 +- src/spRegistrationForm.tpl.html | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/spEmailVerification.tpl.html b/src/spEmailVerification.tpl.html index c7657ff..5a09621 100644 --- a/src/spEmailVerification.tpl.html +++ b/src/spEmailVerification.tpl.html @@ -3,7 +3,7 @@

We are verifying your account

Your account has has been verified! - Login Now. + Login Now.

We have sent a new verification message to your email address, please check your email for this message. diff --git a/src/spLoginForm.tpl.html b/src/spLoginForm.tpl.html index b8d9b27..9940c72 100644 --- a/src/spLoginForm.tpl.html +++ b/src/spLoginForm.tpl.html @@ -49,7 +49,7 @@

- Forgot Password + Forgot Password
diff --git a/src/spPasswordResetForm.tpl.html b/src/spPasswordResetForm.tpl.html index a2343d2..98c6471 100644 --- a/src/spPasswordResetForm.tpl.html +++ b/src/spPasswordResetForm.tpl.html @@ -1,10 +1,10 @@

We are verifying this link

-

Your new password has been set. Please Login Now.

+

Your new password has been set. Please Login Now.

This password reset link is not valid. You may request another - link by clicking here. + link by clicking here.
@@ -13,15 +13,15 @@
- +
- +
- +
- +
diff --git a/src/spPasswordResetRequestForm.tpl.html b/src/spPasswordResetRequestForm.tpl.html index 67438c7..798f603 100644 --- a/src/spPasswordResetRequestForm.tpl.html +++ b/src/spPasswordResetRequestForm.tpl.html @@ -5,7 +5,7 @@ Please check your email for this message, then click on the link.

- Back to Login + Back to Login

diff --git a/src/spRegistrationForm.tpl.html b/src/spRegistrationForm.tpl.html index 818e0ac..3d6f683 100644 --- a/src/spRegistrationForm.tpl.html +++ b/src/spRegistrationForm.tpl.html @@ -37,9 +37,9 @@

Your account has been created. Please check your email for a verification link.

- Back to Login + Back to Login

-

Your account has been created. Login Now.

+

Your account has been created. Login Now.

@@ -70,4 +70,4 @@
- \ No newline at end of file + From 42e46b4d7e349e23d7c2a25f03941c6966076045 Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Mon, 24 Oct 2016 14:50:03 -0600 Subject: [PATCH 2/3] Use $location.path() to navigate between pages, allowing both HTML5 and hashbang modes to work Fixes #175. --- dist/stormpath-sdk-angularjs.js | 35 ++++++++++++++++-------- dist/stormpath-sdk-angularjs.min.js | 4 +-- dist/stormpath-sdk-angularjs.tpls.js | 12 ++++---- dist/stormpath-sdk-angularjs.tpls.min.js | 4 +-- src/spEmailVerification.tpl.html | 4 +-- src/spLoginForm.tpl.html | 2 +- src/spPasswordResetForm.tpl.html | 4 +-- src/spPasswordResetRequestForm.tpl.html | 2 +- src/spRegistrationForm.tpl.html | 4 +-- src/stormpath.emailverification.js | 3 ++ src/stormpath.login.js | 5 +++- src/stormpath.passwordreset.js | 12 ++++++-- src/stormpath.registration.js | 5 +++- 13 files changed, 63 insertions(+), 33 deletions(-) diff --git a/dist/stormpath-sdk-angularjs.js b/dist/stormpath-sdk-angularjs.js index 07d6e48..ea18c81 100644 --- a/dist/stormpath-sdk-angularjs.js +++ b/dist/stormpath-sdk-angularjs.js @@ -2,7 +2,7 @@ * stormpath-sdk-angularjs * Copyright Stormpath, Inc. 2016 * - * @version v1.1.0-dev-2016-08-17 + * @version v1.1.0-dev-2016-10-24 * @link https://github.com/stormpath/stormpath-sdk-angularjs * @license Apache-2.0 */ @@ -1914,6 +1914,9 @@ angular.module('stormpath') $scope.posting = false; }); }; + $scope.login = function(){ + $location.path('/login') + }; }]) /** @@ -2126,7 +2129,7 @@ angular.module('stormpath') angular.module('stormpath') -.controller('SpLoginFormCtrl', ['$scope','$auth','$viewModel',function ($scope,$auth,$viewModel) { +.controller('SpLoginFormCtrl', ['$scope','$auth','$location','$viewModel',function ($scope,$auth,$location,$viewModel) { $scope.viewModel = null; $viewModel.getLoginModel().then(function (model) { @@ -2154,6 +2157,9 @@ angular.module('stormpath') $scope.error = err.message; }); }; + $scope.forgot = function(){ + $location.path('/forgot') + }; }]) @@ -2206,7 +2212,7 @@ angular.module('stormpath') 'use strict'; angular.module('stormpath') -.controller('SpPasswordResetRequestCtrl', ['$scope','$user',function ($scope,$user) { +.controller('SpPasswordResetRequestCtrl', ['$scope','$location','$user',function ($scope,$location,$user) { $scope.sent = false; $scope.posting = false; $scope.formModel = { @@ -2226,6 +2232,12 @@ angular.module('stormpath') $scope.posting = false; }); }; + $scope.forgot = function(){ + $location.path('/forgot'); + }; + $scope.login = function(){ + $location.path('/login'); + }; }]) .controller('SpPasswordResetCtrl', ['$scope','$location','$user',function ($scope,$location,$user) { @@ -2276,7 +2288,9 @@ angular.module('stormpath') $scope.posting = false; }); }; - + $scope.login = function(){ + $location.path('/login'); + }; }]) /** @@ -2427,6 +2441,9 @@ angular.module('stormpath') $scope.error = err.message; }); }; + $scope.login = function(){ + $location.path('/login'); + }; }]) @@ -2544,6 +2561,7 @@ angular.module('stormpath') } }; }); + (function() { 'use strict'; @@ -3183,14 +3201,9 @@ angular.module('stormpath.userService',['stormpath.CONFIG']) * verified and can be used for login. If rejected the token is expired * or has already been used. * - * @param {Object} data Data object + * @param {String} sptoken * - * An object literal for passing the email verification token. - * Must follow this format: - * ``` - * { - * sptoken: '' - * }``` + * The value of the `sptoken` that was sent by email to the user * * @description * diff --git a/dist/stormpath-sdk-angularjs.min.js b/dist/stormpath-sdk-angularjs.min.js index c2dd8e4..bda198b 100644 --- a/dist/stormpath-sdk-angularjs.min.js +++ b/dist/stormpath-sdk-angularjs.min.js @@ -2,8 +2,8 @@ * stormpath-sdk-angularjs * Copyright Stormpath, Inc. 2016 * - * @version v1.1.0-dev-2016-08-17 + * @version v1.1.0-dev-2016-10-24 * @link https://github.com/stormpath/stormpath-sdk-angularjs * @license Apache-2.0 */ -"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="stormpath"),function(a,b,c){"use strict";b.module("stormpath",["stormpath.CONFIG","stormpath.auth","stormpath.userService","stormpath.viewModelService","stormpath.socialLogin","stormpath.facebookLogin","stormpath.googleLogin"]).factory("SpAuthInterceptor",[function(){function a(){}return a.prototype.request=function(a){return a.withCredentials=!0,a},new a}]).factory("StormpathAgentInterceptor",["$window",function(a){function c(b){var c=a.document.createElement("a");return c.href=b,c}function d(){}return d.prototype.request=function(d){var e=c(d.url),f=a.location;return e.host===f.host&&(d.headers["X-Stormpath-Agent"]="stormpath-sdk-angularjs/1.1.0 angularjs/"+b.version.full),d},new d}]).config(["$httpProvider",function(a){a.interceptors.push("SpAuthInterceptor"),a.interceptors.push("StormpathAgentInterceptor")}]).provider("$stormpath",[function(){this.$get=["$user","$injector","STORMPATH_CONFIG","$rootScope","$location",function(a,b,c,d,e){function f(){var a=new l;return this.encodeUrlForm=a.encode.bind(a),b.has("$state")&&(m=b.get("$state")),b.has("$route")&&(n=b.get("$route")),this}function g(a,b){d.$broadcast(c.STATE_CHANGE_UNAUTHENTICATED,a,b)}function h(a,b){d.$broadcast(c.STATE_CHANGE_UNAUTHORIZED,a,b)}function i(b){var c=b;return c&&c.authorize&&c.authorize.group?a.currentUser.inGroup(c.authorize.group):(console.error("Unknown authorize configuration for spStateConfig",b),!1)}function j(a){d.$broadcast(c.ROUTE_CHANGE_UNAUTHENTICATED,a)}function k(a){d.$broadcast(c.ROUTE_CHANGE_UNAUTHORIZED,a)}function l(){return this.delimiter="&",this.arrayPrefixGenerators={brackets:function(a){return a+"[]"},indices:function(a,b){return a+"["+b+"]"},repeat:function(a){return a}},this}var m,n;return f.prototype.stateChangeInterceptor=function(b){d.$on("$stateChangeStart",function(c,d,e){var f=d.sp||{};!f.authenticate&&!f.authorize||a.currentUser?f.waitForUser&&null===a.currentUser?(c.preventDefault(),a.get()["finally"](function(){m.go(d.name,e)})):a.currentUser&&f.authorize?i(f)||(c.preventDefault(),h(d,e)):d.name===b.loginState&&a.currentUser!==!1&&(c.preventDefault(),a.get()["finally"](function(){a.currentUser&&a.currentUser.href?m.go(b.defaultPostLoginState):m.go(d.name,e)})):(c.preventDefault(),a.get().then(function(){f.authorize?i(f)?m.go(d.name,e):h(d,e):m.go(d.name,e)},function(){g(d,e)}))})},f.prototype.routeChangeInterceptor=function(b){function c(a){setTimeout(function(){a.$$route.originalPath===e.path()?n.reload():e.path(a)})}d.$on("$routeChangeStart",function(d,e){if(e.$$route){var f=e.$$route.sp||{};!f.authenticate&&!f.authorize||a.currentUser?f.waitForUser&&null===a.currentUser?(d.preventDefault(),a.get()["finally"](function(){c(e)})):a.currentUser&&f.authorize?i(f)||(d.preventDefault(),k(e)):e.$$route.originalPath===b.loginRoute&&a.currentUser&&a.currentUser.href&&(d.preventDefault(),c(b.defaultPostLoginRoute)):(d.preventDefault(),a.get().then(function(){f.authorize?i(f)?c(e):h(e):c(e)},function(){j(e)}))}})},f.prototype.uiRouter=function(a){var b=this;a="object"==typeof a?a:{},this.stateChangeInterceptor(a),a.loginState&&(b.unauthenticatedWather=d.$on(c.STATE_CHANGE_UNAUTHENTICATED,function(c,d,e){b.postLogin={toState:d,toParams:e},m.go(a.loginState)})),d.$on(c.AUTHENTICATION_SUCCESS_EVENT_NAME,function(){b.postLogin&&a.autoRedirect!==!1?m.go(b.postLogin.toState,b.postLogin.toParams).then(function(){b.postLogin=null}):a.defaultPostLoginState&&m.go(a.defaultPostLoginState)}),a.forbiddenState&&(b.forbiddenWatcher=d.$on(c.STATE_CHANGE_UNAUTHORIZED,function(){m.go(a.forbiddenState)}))},f.prototype.ngRouter=function(a){var b=this;a="object"==typeof a?a:{},this.routeChangeInterceptor(a),a.loginRoute&&(this.unauthenticatedWather=d.$on(c.ROUTE_CHANGE_UNAUTHENTICATED,function(c,d){b.postLogin={toRoute:d},e.path(a.loginRoute)})),d.$on(c.AUTHENTICATION_SUCCESS_EVENT_NAME,function(){b.postLogin&&a.autoRedirect!==!1?(e.path(b.postLogin.toRoute),b.postLogin=null):a.defaultPostLoginRoute&&e.path(a.defaultPostLoginRoute)}),a.forbiddenRoute&&(this.forbiddenWatcher=d.$on(c.ROUTE_CHANGE_UNAUTHORIZED,function(){e.path(a.forbiddenRoute)}))},f.prototype.regexAttrParser=function(a){var b;return b=a instanceof RegExp?a:a&&/^\/.+\/[gim]?$/.test(a)?new RegExp(a.split("/")[1],a.split("/")[2]):a},l.prototype.stringify=function(a,b,c){if(a instanceof Date?a=a.toISOString():null===a&&(a=""),"string"==typeof a||"number"==typeof a||"boolean"==typeof a)return[encodeURIComponent(b)+"="+encodeURIComponent(a)];var d=[];if("undefined"==typeof a)return d;for(var e=Object.keys(a),f=0,g=e.length;f-1}),a.viewModel=b})["catch"](function(a){throw new Error("Could not load login view model from back-end: "+a.message)}),a.formModel={},a.posting=!1,a.submit=function(){a.posting=!0,a.error=null,b.authenticate(a.formModel)["catch"](function(b){a.posting=!1,a.error=b.message})}}]).directive("spLoginForm",function(){return{templateUrl:function(a,b){return b.templateUrl||"spLoginForm.tpl.html"},controller:"SpLoginFormCtrl"}}),b.module("stormpath").controller("SpPasswordResetRequestCtrl",["$scope","$user",function(a,b){a.sent=!1,a.posting=!1,a.formModel={username:""},a.error=null,a.submit=function(){a.posting=!0,a.error=null,b.passwordResetRequest({email:a.formModel.email}).then(function(){a.sent=!0})["catch"](function(b){a.error=b.message})["finally"](function(){a.posting=!1})}}]).controller("SpPasswordResetCtrl",["$scope","$location","$user",function(a,b,c){var d=b.search().sptoken;a.showVerificationError=!1,a.verifying=!1,a.verified=!1,a.posting=!1,a.reset=!1,a.error=null,a.resendFailed=!1,a.formModel={password:"",confirmPassword:""},"string"==typeof d?(a.verifying=!0,c.verifyPasswordResetToken(d).then(function(){a.verified=!0})["catch"](function(){a.showVerificationError=!0})["finally"](function(){a.verifying=!1})):a.showVerificationError=!0,a.submit=function(){return a.formModel.password!==a.formModel.confirmPassword?void(a.error="Passwords do not match"):(a.posting=!0,a.error=null,a.showVerificationError=!1,void c.resetPassword(d,{password:a.formModel.password}).then(function(){a.reset=!0})["catch"](function(b){a.error=b.message})["finally"](function(){a.posting=!1}))}}]).directive("spPasswordResetRequestForm",function(){return{templateUrl:function(a,b){return b.templateUrl||"spPasswordResetRequestForm.tpl.html"},controller:"SpPasswordResetRequestCtrl"}}).directive("spPasswordResetForm",function(){return{templateUrl:function(a,b){return b.templateUrl||"spPasswordResetForm.tpl.html"},controller:"SpPasswordResetCtrl"}}),b.module("stormpath").controller("SpRegistrationFormCtrl",["$scope","$user","$auth","$location","$viewModel","$injector",function(a,b,c,d,e,f){a.formModel="object"==typeof a.formModel?a.formModel:{},a.created=!1,a.enabled=!1,a.creating=!1,a.authenticating=!1,a.viewModel=null,e.getRegisterModel().then(function(b){var c=["facebook","google"];b.accountStores=b.accountStores.filter(function(a){var b=a.provider.providerId;return c.indexOf(b)>-1}),a.viewModel=b})["catch"](function(a){throw new Error("Could not load login view model from back-end: "+a.message)}),a.submit=function(){a.creating=!0,a.error=null,b.create(a.formModel).then(function(b){a.created=!0,a.enabled="ENABLED"===b.status,a.enabled&&a.autoLogin?(a.authenticating=!0,c.authenticate({username:a.formModel.email,password:a.formModel.password}).then(function(){var b=f.has("$state")?f.get("$state"):null;a.postLoginState&&b?b.go(a.postLoginState):a.postLoginPath&&d.path(a.postLoginPath)})["catch"](function(b){a.error=b.message})["finally"](function(){a.authenticating=!1,a.creating=!1})):a.creating=!1})["catch"](function(b){a.creating=!1,a.error=b.message})}}]).directive("spRegistrationForm",function(){return{templateUrl:function(a,b){return b.templateUrl||"spRegistrationForm.tpl.html"},controller:"SpRegistrationFormCtrl",link:function(a,b,c){a.autoLogin="true"===c.autoLogin,a.postLoginPath=c.postLoginPath||"",a.postLoginState=c.postLoginState||""}}}),function(){function c(a,b){switch(b.status){case"connected":a.resolve({providerData:{providerId:"facebook",accessToken:b.authResponse.accessToken}});break;case"not_authorized":a.reject(new Error("Please log into this app"));break;default:a.reject(new Error("Please log into Facebook."))}}function d(a,b){this.name="Facebook",this.clientId=null,this.$q=a,this.$spJsLoader=b}d.prototype.init=function(){var b=this.clientId;a.fbAsyncInit=function(){FB.init({appId:b,status:!0,cookie:!0,xfbml:!0,version:"v2.4"})},a.FB?a.fbAsyncInit():this.$spJsLoader.load("facebook-jssdk","//connect.facebook.net/en_US/sdk.js")},d.prototype.login=function(a){var b=this.$q.defer();return FB.login(c.bind(null,b),a),b.promise},b.module("stormpath.facebookLogin",[]).provider("$facebookLogin",function(){this.$get=["$q","$spJsLoader",function(a,b){return new d(a,b)}]})}(),function(){function a(a,b){this.name="Google",this.clientId=null,this.googleAuth=null,this.$q=a,this.$spJsLoader=b}a.prototype.setGoogleAuth=function(a){this.googleAuth=a},a.prototype.init=function(a){var b=this.clientId,c=this.setGoogleAuth.bind(this);this.$spJsLoader.load("google-jssdk","//apis.google.com/js/api:client.js").then(function(){gapi.load("auth2",function(){var a=gapi.auth2.init({client_id:b,cookiepolicy:"single_host_origin"});c(a)})})},a.prototype.login=function(a){var b=this.$q.defer();return a=a||{},a.redirect_uri="postmessage",this.googleAuth.grantOfflineAccess(a).then(function(a){b.resolve({providerData:{providerId:"google",code:a.code}})},function(a){b.reject(a)}),b.promise},b.module("stormpath.googleLogin",[]).provider("$googleLogin",function(){this.$get=["$q","$spJsLoader",function(b,c){return new a(b,c)}]})}(),function(){function a(a,b,c,d){this.providersPromise=null,this.STORMPATH_CONFIG=a,this.$injector=b,this.$http=c,this.$q=d}b.module("stormpath.socialLogin",["stormpath.CONFIG"]).config(["$injector","STORMPATH_CONFIG",function(b,c){var d=["$http","$q","$injector",function(b,d,e){return new a(c,e,b,d)}];b.get("$provide").factory(c.SOCIAL_LOGIN_SERVICE_NAME,d)}]).factory("$spJsLoader",["$q",function(a){return{load:function(b,c,d){var e=a.defer(),f=document.getElementsByTagName("script")[0],g=document.createElement("script");return document.getElementById(b)?e.resolve():(g.id=b,g.src=c,g.innerHTML=d,g.onload=e.resolve,f.parentNode.insertBefore(g,f)),e.promise}}}]).directive("spSocialLogin",["$viewModel","$auth","$injector",function(a,b,c){return{link:function(a,d,e){var f,g=a.$parent;try{f=c.get("$"+e.spSocialLogin+"Login")}catch(h){return}f.clientId=e.spClientId,f.init(d),a.providerName=f.name,d.bind("click",function(){var a={scope:e.spScope};g.posting=!0,f.login(a).then(function(a){return b.authenticate(a)})["catch"](function(a){g.posting=!1,a.message?g.error=a.message:g.error="An error occured when communicating with server."})})}}}])}(),function(){function a(a){return"api_key: "+a+"\nauthorize: true"}function c(b,c){var d=a(c);b.load("linkedin-jssdk","//platform.linkedin.com/in.js",d)}function d(a,b){this.name="LinkedIn",this.clientId=null,this.$q=a,this.$spJsLoader=b}d.prototype.init=function(a){c(this.$spJsLoader,this.clientId)},d.prototype.login=function(a){var b=this.$q.defer();return IN.User.authorize(function(){b.resolve({providerData:{providerId:"linkedin",accessToken:IN.ENV.auth.oauth_token}})}),b.promise},b.module("stormpath.linkedinLogin",[]).provider("$linkedinLogin",function(){this.$get=["$q","$spJsLoader",function(a,b){return new d(a,b)}]})}(),b.module("stormpath.userService",["stormpath.CONFIG"]).provider("$user",[function(){function a(a){var b=this;Object.keys(a).map(function(c){b[c]=a[c]})}a.prototype.inGroup=function(a){return this.groups.items.filter(function(b){return b.name===a}).length>0},a.prototype.matchesGroupExpression=function(a){return this.groups.items.filter(function(b){return a.test(b.name)}).length>0},a.prototype.groupTest=function(a){return!!(a instanceof RegExp&&this.matchesGroupExpression(a))||!!this.inGroup(a)},this.$get=["$q","$http","STORMPATH_CONFIG","$rootScope","$spFormEncoder","$spErrorTransformer",function(b,c,d,e,f,g){function h(){return this.cachedUserOp=null,this.currentUser=null,this}function i(a){e.$broadcast(d.REGISTERED_EVENT_NAME,a)}function j(a){e.$broadcast(d.GET_USER_EVENT,a)}function k(){e.$broadcast(d.NOT_LOGGED_IN_EVENT)}h.prototype.create=function(a){return c(f.formPost({url:d.getUrl("REGISTER_URI"),method:"POST",data:a})).then(function(a){var c=a.data.account||a.data;return i(c),b.resolve(c)},function(a){return b.reject(g.transformError(a))})},h.prototype.get=function(e){var f=b.defer(),g=this;return g.cachedUserOp?g.cachedUserOp.promise:null!==g.currentUser&&g.currentUser!==!1&&e!==!0?(f.resolve(g.currentUser),f.promise):(g.cachedUserOp=f,c.get(d.getUrl("CURRENT_USER_URI"),{withCredentials:!0}).then(function(b){g.cachedUserOp=null,g.currentUser=new a(b.data.account||b.data),j(g.currentUser),f.resolve(g.currentUser)},function(a){g.currentUser=!1,401===a.status&&k(),g.cachedUserOp=null,f.reject(a)}),f.promise)},h.prototype.resendVerificationEmail=function(a){return c({method:"POST",url:d.getUrl("EMAIL_VERIFICATION_ENDPOINT"),data:a})},h.prototype.verify=function(a){return c({url:d.getUrl("EMAIL_VERIFICATION_ENDPOINT")+"?sptoken="+a})},h.prototype.verifyPasswordResetToken=function(a){return c.get(d.getUrl("CHANGE_PASSWORD_ENDPOINT")+"?sptoken="+a)},h.prototype.passwordResetRequest=function(a){return c(f.formPost({method:"POST",url:d.getUrl("FORGOT_PASSWORD_ENDPOINT"),data:a}))["catch"](function(a){return b.reject(g.transformError(a))})},h.prototype.resetPassword=function(a,e){return e.sptoken=a,c(f.formPost({method:"POST",url:d.getUrl("CHANGE_PASSWORD_ENDPOINT"),data:e}))["catch"](function(a){return b.reject(g.transformError(a))})};var l=new h;return e.$on(d.SESSION_END_EVENT,function(){l.currentUser=!1}),l}]}]),function(){function a(a,b){this.$http=a,this.STORMPATH_CONFIG=b}a.prototype.getLoginModel=function(){return this.$http.get(this.STORMPATH_CONFIG.getUrl("AUTHENTICATION_ENDPOINT"),{headers:{Accept:"application/json"}}).then(function(a){return a.data})},a.prototype.getRegisterModel=function(){return this.$http.get(this.STORMPATH_CONFIG.getUrl("REGISTER_URI"),{headers:{Accept:"application/json"}}).then(function(a){return a.data})},b.module("stormpath.viewModelService",[]).provider("$viewModel",function(){this.$get=["$http","STORMPATH_CONFIG",function(b,c){return new a(b,c)}]})}()}(window,window.angular); \ No newline at end of file +"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="stormpath"),function(a,b,c){"use strict";b.module("stormpath",["stormpath.CONFIG","stormpath.auth","stormpath.userService","stormpath.viewModelService","stormpath.socialLogin","stormpath.facebookLogin","stormpath.googleLogin"]).factory("SpAuthInterceptor",[function(){function a(){}return a.prototype.request=function(a){return a.withCredentials=!0,a},new a}]).factory("StormpathAgentInterceptor",["$window",function(a){function c(b){var c=a.document.createElement("a");return c.href=b,c}function d(){}return d.prototype.request=function(d){var e=c(d.url),f=a.location;return e.host===f.host&&(d.headers["X-Stormpath-Agent"]="stormpath-sdk-angularjs/1.1.0 angularjs/"+b.version.full),d},new d}]).config(["$httpProvider",function(a){a.interceptors.push("SpAuthInterceptor"),a.interceptors.push("StormpathAgentInterceptor")}]).provider("$stormpath",[function(){this.$get=["$user","$injector","STORMPATH_CONFIG","$rootScope","$location",function(a,b,c,d,e){function f(){var a=new l;return this.encodeUrlForm=a.encode.bind(a),b.has("$state")&&(m=b.get("$state")),b.has("$route")&&(n=b.get("$route")),this}function g(a,b){d.$broadcast(c.STATE_CHANGE_UNAUTHENTICATED,a,b)}function h(a,b){d.$broadcast(c.STATE_CHANGE_UNAUTHORIZED,a,b)}function i(b){var c=b;return c&&c.authorize&&c.authorize.group?a.currentUser.inGroup(c.authorize.group):(console.error("Unknown authorize configuration for spStateConfig",b),!1)}function j(a){d.$broadcast(c.ROUTE_CHANGE_UNAUTHENTICATED,a)}function k(a){d.$broadcast(c.ROUTE_CHANGE_UNAUTHORIZED,a)}function l(){return this.delimiter="&",this.arrayPrefixGenerators={brackets:function(a){return a+"[]"},indices:function(a,b){return a+"["+b+"]"},repeat:function(a){return a}},this}var m,n;return f.prototype.stateChangeInterceptor=function(b){d.$on("$stateChangeStart",function(c,d,e){var f=d.sp||{};!f.authenticate&&!f.authorize||a.currentUser?f.waitForUser&&null===a.currentUser?(c.preventDefault(),a.get()["finally"](function(){m.go(d.name,e)})):a.currentUser&&f.authorize?i(f)||(c.preventDefault(),h(d,e)):d.name===b.loginState&&a.currentUser!==!1&&(c.preventDefault(),a.get()["finally"](function(){a.currentUser&&a.currentUser.href?m.go(b.defaultPostLoginState):m.go(d.name,e)})):(c.preventDefault(),a.get().then(function(){f.authorize?i(f)?m.go(d.name,e):h(d,e):m.go(d.name,e)},function(){g(d,e)}))})},f.prototype.routeChangeInterceptor=function(b){function c(a){setTimeout(function(){a.$$route.originalPath===e.path()?n.reload():e.path(a)})}d.$on("$routeChangeStart",function(d,e){if(e.$$route){var f=e.$$route.sp||{};!f.authenticate&&!f.authorize||a.currentUser?f.waitForUser&&null===a.currentUser?(d.preventDefault(),a.get()["finally"](function(){c(e)})):a.currentUser&&f.authorize?i(f)||(d.preventDefault(),k(e)):e.$$route.originalPath===b.loginRoute&&a.currentUser&&a.currentUser.href&&(d.preventDefault(),c(b.defaultPostLoginRoute)):(d.preventDefault(),a.get().then(function(){f.authorize?i(f)?c(e):h(e):c(e)},function(){j(e)}))}})},f.prototype.uiRouter=function(a){var b=this;a="object"==typeof a?a:{},this.stateChangeInterceptor(a),a.loginState&&(b.unauthenticatedWather=d.$on(c.STATE_CHANGE_UNAUTHENTICATED,function(c,d,e){b.postLogin={toState:d,toParams:e},m.go(a.loginState)})),d.$on(c.AUTHENTICATION_SUCCESS_EVENT_NAME,function(){b.postLogin&&a.autoRedirect!==!1?m.go(b.postLogin.toState,b.postLogin.toParams).then(function(){b.postLogin=null}):a.defaultPostLoginState&&m.go(a.defaultPostLoginState)}),a.forbiddenState&&(b.forbiddenWatcher=d.$on(c.STATE_CHANGE_UNAUTHORIZED,function(){m.go(a.forbiddenState)}))},f.prototype.ngRouter=function(a){var b=this;a="object"==typeof a?a:{},this.routeChangeInterceptor(a),a.loginRoute&&(this.unauthenticatedWather=d.$on(c.ROUTE_CHANGE_UNAUTHENTICATED,function(c,d){b.postLogin={toRoute:d},e.path(a.loginRoute)})),d.$on(c.AUTHENTICATION_SUCCESS_EVENT_NAME,function(){b.postLogin&&a.autoRedirect!==!1?(e.path(b.postLogin.toRoute),b.postLogin=null):a.defaultPostLoginRoute&&e.path(a.defaultPostLoginRoute)}),a.forbiddenRoute&&(this.forbiddenWatcher=d.$on(c.ROUTE_CHANGE_UNAUTHORIZED,function(){e.path(a.forbiddenRoute)}))},f.prototype.regexAttrParser=function(a){var b;return b=a instanceof RegExp?a:a&&/^\/.+\/[gim]?$/.test(a)?new RegExp(a.split("/")[1],a.split("/")[2]):a},l.prototype.stringify=function(a,b,c){if(a instanceof Date?a=a.toISOString():null===a&&(a=""),"string"==typeof a||"number"==typeof a||"boolean"==typeof a)return[encodeURIComponent(b)+"="+encodeURIComponent(a)];var d=[];if("undefined"==typeof a)return d;for(var e=Object.keys(a),f=0,g=e.length;f-1}),a.viewModel=b})["catch"](function(a){throw new Error("Could not load login view model from back-end: "+a.message)}),a.formModel={},a.posting=!1,a.submit=function(){a.posting=!0,a.error=null,b.authenticate(a.formModel)["catch"](function(b){a.posting=!1,a.error=b.message})},a.forgot=function(){c.path("/forgot")}}]).directive("spLoginForm",function(){return{templateUrl:function(a,b){return b.templateUrl||"spLoginForm.tpl.html"},controller:"SpLoginFormCtrl"}}),b.module("stormpath").controller("SpPasswordResetRequestCtrl",["$scope","$location","$user",function(a,b,c){a.sent=!1,a.posting=!1,a.formModel={username:""},a.error=null,a.submit=function(){a.posting=!0,a.error=null,c.passwordResetRequest({email:a.formModel.email}).then(function(){a.sent=!0})["catch"](function(b){a.error=b.message})["finally"](function(){a.posting=!1})},a.forgot=function(){b.path("/forgot")},a.login=function(){b.path("/login")}}]).controller("SpPasswordResetCtrl",["$scope","$location","$user",function(a,b,c){var d=b.search().sptoken;a.showVerificationError=!1,a.verifying=!1,a.verified=!1,a.posting=!1,a.reset=!1,a.error=null,a.resendFailed=!1,a.formModel={password:"",confirmPassword:""},"string"==typeof d?(a.verifying=!0,c.verifyPasswordResetToken(d).then(function(){a.verified=!0})["catch"](function(){a.showVerificationError=!0})["finally"](function(){a.verifying=!1})):a.showVerificationError=!0,a.submit=function(){return a.formModel.password!==a.formModel.confirmPassword?void(a.error="Passwords do not match"):(a.posting=!0,a.error=null,a.showVerificationError=!1,void c.resetPassword(d,{password:a.formModel.password}).then(function(){a.reset=!0})["catch"](function(b){a.error=b.message})["finally"](function(){a.posting=!1}))},a.login=function(){b.path("/login")}}]).directive("spPasswordResetRequestForm",function(){return{templateUrl:function(a,b){return b.templateUrl||"spPasswordResetRequestForm.tpl.html"},controller:"SpPasswordResetRequestCtrl"}}).directive("spPasswordResetForm",function(){return{templateUrl:function(a,b){return b.templateUrl||"spPasswordResetForm.tpl.html"},controller:"SpPasswordResetCtrl"}}),b.module("stormpath").controller("SpRegistrationFormCtrl",["$scope","$user","$auth","$location","$viewModel","$injector",function(a,b,c,d,e,f){a.formModel="object"==typeof a.formModel?a.formModel:{},a.created=!1,a.enabled=!1,a.creating=!1,a.authenticating=!1,a.viewModel=null,e.getRegisterModel().then(function(b){var c=["facebook","google"];b.accountStores=b.accountStores.filter(function(a){var b=a.provider.providerId;return c.indexOf(b)>-1}),a.viewModel=b})["catch"](function(a){throw new Error("Could not load login view model from back-end: "+a.message)}),a.submit=function(){a.creating=!0,a.error=null,b.create(a.formModel).then(function(b){a.created=!0,a.enabled="ENABLED"===b.status,a.enabled&&a.autoLogin?(a.authenticating=!0,c.authenticate({username:a.formModel.email,password:a.formModel.password}).then(function(){var b=f.has("$state")?f.get("$state"):null;a.postLoginState&&b?b.go(a.postLoginState):a.postLoginPath&&d.path(a.postLoginPath)})["catch"](function(b){a.error=b.message})["finally"](function(){a.authenticating=!1,a.creating=!1})):a.creating=!1})["catch"](function(b){a.creating=!1,a.error=b.message})},a.login=function(){d.path("/login")}}]).directive("spRegistrationForm",function(){return{templateUrl:function(a,b){return b.templateUrl||"spRegistrationForm.tpl.html"},controller:"SpRegistrationFormCtrl",link:function(a,b,c){a.autoLogin="true"===c.autoLogin,a.postLoginPath=c.postLoginPath||"",a.postLoginState=c.postLoginState||""}}}),function(){function c(a,b){switch(b.status){case"connected":a.resolve({providerData:{providerId:"facebook",accessToken:b.authResponse.accessToken}});break;case"not_authorized":a.reject(new Error("Please log into this app"));break;default:a.reject(new Error("Please log into Facebook."))}}function d(a,b){this.name="Facebook",this.clientId=null,this.$q=a,this.$spJsLoader=b}d.prototype.init=function(){var b=this.clientId;a.fbAsyncInit=function(){FB.init({appId:b,status:!0,cookie:!0,xfbml:!0,version:"v2.4"})},a.FB?a.fbAsyncInit():this.$spJsLoader.load("facebook-jssdk","//connect.facebook.net/en_US/sdk.js")},d.prototype.login=function(a){var b=this.$q.defer();return FB.login(c.bind(null,b),a),b.promise},b.module("stormpath.facebookLogin",[]).provider("$facebookLogin",function(){this.$get=["$q","$spJsLoader",function(a,b){return new d(a,b)}]})}(),function(){function a(a,b){this.name="Google",this.clientId=null,this.googleAuth=null,this.$q=a,this.$spJsLoader=b}a.prototype.setGoogleAuth=function(a){this.googleAuth=a},a.prototype.init=function(a){var b=this.clientId,c=this.setGoogleAuth.bind(this);this.$spJsLoader.load("google-jssdk","//apis.google.com/js/api:client.js").then(function(){gapi.load("auth2",function(){var a=gapi.auth2.init({client_id:b,cookiepolicy:"single_host_origin"});c(a)})})},a.prototype.login=function(a){var b=this.$q.defer();return a=a||{},a.redirect_uri="postmessage",this.googleAuth.grantOfflineAccess(a).then(function(a){b.resolve({providerData:{providerId:"google",code:a.code}})},function(a){b.reject(a)}),b.promise},b.module("stormpath.googleLogin",[]).provider("$googleLogin",function(){this.$get=["$q","$spJsLoader",function(b,c){return new a(b,c)}]})}(),function(){function a(a,b,c,d){this.providersPromise=null,this.STORMPATH_CONFIG=a,this.$injector=b,this.$http=c,this.$q=d}b.module("stormpath.socialLogin",["stormpath.CONFIG"]).config(["$injector","STORMPATH_CONFIG",function(b,c){var d=["$http","$q","$injector",function(b,d,e){return new a(c,e,b,d)}];b.get("$provide").factory(c.SOCIAL_LOGIN_SERVICE_NAME,d)}]).factory("$spJsLoader",["$q",function(a){return{load:function(b,c,d){var e=a.defer(),f=document.getElementsByTagName("script")[0],g=document.createElement("script");return document.getElementById(b)?e.resolve():(g.id=b,g.src=c,g.innerHTML=d,g.onload=e.resolve,f.parentNode.insertBefore(g,f)),e.promise}}}]).directive("spSocialLogin",["$viewModel","$auth","$injector",function(a,b,c){return{link:function(a,d,e){var f,g=a.$parent;try{f=c.get("$"+e.spSocialLogin+"Login")}catch(h){return}f.clientId=e.spClientId,f.init(d),a.providerName=f.name,d.bind("click",function(){var a={scope:e.spScope};g.posting=!0,f.login(a).then(function(a){return b.authenticate(a)})["catch"](function(a){g.posting=!1,a.message?g.error=a.message:g.error="An error occured when communicating with server."})})}}}])}(),function(){function a(a){return"api_key: "+a+"\nauthorize: true"}function c(b,c){var d=a(c);b.load("linkedin-jssdk","//platform.linkedin.com/in.js",d)}function d(a,b){this.name="LinkedIn",this.clientId=null,this.$q=a,this.$spJsLoader=b}d.prototype.init=function(a){c(this.$spJsLoader,this.clientId)},d.prototype.login=function(a){var b=this.$q.defer();return IN.User.authorize(function(){b.resolve({providerData:{providerId:"linkedin",accessToken:IN.ENV.auth.oauth_token}})}),b.promise},b.module("stormpath.linkedinLogin",[]).provider("$linkedinLogin",function(){this.$get=["$q","$spJsLoader",function(a,b){return new d(a,b)}]})}(),b.module("stormpath.userService",["stormpath.CONFIG"]).provider("$user",[function(){function a(a){var b=this;Object.keys(a).map(function(c){b[c]=a[c]})}a.prototype.inGroup=function(a){return this.groups.items.filter(function(b){return b.name===a}).length>0},a.prototype.matchesGroupExpression=function(a){return this.groups.items.filter(function(b){return a.test(b.name)}).length>0},a.prototype.groupTest=function(a){return!!(a instanceof RegExp&&this.matchesGroupExpression(a))||!!this.inGroup(a)},this.$get=["$q","$http","STORMPATH_CONFIG","$rootScope","$spFormEncoder","$spErrorTransformer",function(b,c,d,e,f,g){function h(){return this.cachedUserOp=null,this.currentUser=null,this}function i(a){e.$broadcast(d.REGISTERED_EVENT_NAME,a)}function j(a){e.$broadcast(d.GET_USER_EVENT,a)}function k(){e.$broadcast(d.NOT_LOGGED_IN_EVENT)}h.prototype.create=function(a){return c(f.formPost({url:d.getUrl("REGISTER_URI"),method:"POST",data:a})).then(function(a){var c=a.data.account||a.data;return i(c),b.resolve(c)},function(a){return b.reject(g.transformError(a))})},h.prototype.get=function(e){var f=b.defer(),g=this;return g.cachedUserOp?g.cachedUserOp.promise:null!==g.currentUser&&g.currentUser!==!1&&e!==!0?(f.resolve(g.currentUser),f.promise):(g.cachedUserOp=f,c.get(d.getUrl("CURRENT_USER_URI"),{withCredentials:!0}).then(function(b){g.cachedUserOp=null,g.currentUser=new a(b.data.account||b.data),j(g.currentUser),f.resolve(g.currentUser)},function(a){g.currentUser=!1,401===a.status&&k(),g.cachedUserOp=null,f.reject(a)}),f.promise)},h.prototype.resendVerificationEmail=function(a){return c({method:"POST",url:d.getUrl("EMAIL_VERIFICATION_ENDPOINT"),data:a})},h.prototype.verify=function(a){return c({url:d.getUrl("EMAIL_VERIFICATION_ENDPOINT")+"?sptoken="+a})},h.prototype.verifyPasswordResetToken=function(a){return c.get(d.getUrl("CHANGE_PASSWORD_ENDPOINT")+"?sptoken="+a)},h.prototype.passwordResetRequest=function(a){return c(f.formPost({method:"POST",url:d.getUrl("FORGOT_PASSWORD_ENDPOINT"),data:a}))["catch"](function(a){return b.reject(g.transformError(a))})},h.prototype.resetPassword=function(a,e){return e.sptoken=a,c(f.formPost({method:"POST",url:d.getUrl("CHANGE_PASSWORD_ENDPOINT"),data:e}))["catch"](function(a){return b.reject(g.transformError(a))})};var l=new h;return e.$on(d.SESSION_END_EVENT,function(){l.currentUser=!1}),l}]}]),function(){function a(a,b){this.$http=a,this.STORMPATH_CONFIG=b}a.prototype.getLoginModel=function(){return this.$http.get(this.STORMPATH_CONFIG.getUrl("AUTHENTICATION_ENDPOINT"),{headers:{Accept:"application/json"}}).then(function(a){return a.data})},a.prototype.getRegisterModel=function(){return this.$http.get(this.STORMPATH_CONFIG.getUrl("REGISTER_URI"),{headers:{Accept:"application/json"}}).then(function(a){return a.data})},b.module("stormpath.viewModelService",[]).provider("$viewModel",function(){this.$get=["$http","STORMPATH_CONFIG",function(b,c){return new a(b,c)}]})}()}(window,window.angular); \ No newline at end of file diff --git a/dist/stormpath-sdk-angularjs.tpls.js b/dist/stormpath-sdk-angularjs.tpls.js index 36a942e..bbefeca 100644 --- a/dist/stormpath-sdk-angularjs.tpls.js +++ b/dist/stormpath-sdk-angularjs.tpls.js @@ -2,7 +2,7 @@ * stormpath-sdk-angularjs * Copyright Stormpath, Inc. 2016 * - * @version v1.1.0-dev-2016-08-17 + * @version v1.1.0-dev-2016-10-24 * @link https://github.com/stormpath/stormpath-sdk-angularjs * @license Apache-2.0 */ @@ -18,7 +18,7 @@ angular.module('stormpath.templates', ['spEmailVerification.tpl.html', 'spLoginF angular.module("spEmailVerification.tpl.html", []).run(["$templateCache", function($templateCache) { $templateCache.put("spEmailVerification.tpl.html", - "

We are verifying your account

Your account has has been verified! Login Now.

We have sent a new verification message to your email address, please check your email for this message.

This email verification link is not valid. If you need us to re-send an email verification message, please enter your email address or username below.
Sorry, there was a problem with that email or username. Please try again.

"); + "

We are verifying your account

Your account has has been verified! Login Now.

We have sent a new verification message to your email address, please check your email for this message.

This email verification link is not valid. If you need us to re-send an email verification message, please enter your email address or username below.
Sorry, there was a problem with that email or username. Please try again.

"); }]); angular.module("spLoginForm.tpl.html", []).run(["$templateCache", function($templateCache) { @@ -54,17 +54,17 @@ angular.module("spLoginForm.tpl.html", []).run(["$templateCache", function($temp "\n" + " .sp-loading {\n" + " text-align: center;\n" + - " }
Loading...

Or login with:

"); + " }
Loading...

Or login with:

"); }]); angular.module("spPasswordResetForm.tpl.html", []).run(["$templateCache", function($templateCache) { $templateCache.put("spPasswordResetForm.tpl.html", - "

We are verifying this link

Your new password has been set. Please Login Now.

This password reset link is not valid. You may request another link by clicking here.

"); + "

We are verifying this link

Your new password has been set. Please Login Now.

This password reset link is not valid. You may request another link by clicking here.

"); }]); angular.module("spPasswordResetRequestForm.tpl.html", []).run(["$templateCache", function($templateCache) { $templateCache.put("spPasswordResetRequestForm.tpl.html", - "

We have sent a password reset link to the email address of the account that you specified. Please check your email for this message, then click on the link.

Back to Login

"); + "

We have sent a password reset link to the email address of the account that you specified. Please check your email for this message, then click on the link.

Back to Login

"); }]); angular.module("spRegistrationForm.tpl.html", []).run(["$templateCache", function($templateCache) { @@ -100,6 +100,6 @@ angular.module("spRegistrationForm.tpl.html", []).run(["$templateCache", functio "\n" + " .sp-loading {\n" + " text-align: center;\n" + - " }

Your account has been created. Please check your email for a verification link.

Back to Login

Your account has been created. Login Now.

Loading...

Or register with:

"); + " }

Your account has been created. Please check your email for a verification link.

Back to Login

Your account has been created. Login Now.

Loading...

Or register with:

"); }]); })(window, window.angular); diff --git a/dist/stormpath-sdk-angularjs.tpls.min.js b/dist/stormpath-sdk-angularjs.tpls.min.js index 843bc63..4b15d80 100644 --- a/dist/stormpath-sdk-angularjs.tpls.min.js +++ b/dist/stormpath-sdk-angularjs.tpls.min.js @@ -2,8 +2,8 @@ * stormpath-sdk-angularjs * Copyright Stormpath, Inc. 2016 * - * @version v1.1.0-dev-2016-08-17 + * @version v1.1.0-dev-2016-10-24 * @link https://github.com/stormpath/stormpath-sdk-angularjs * @license Apache-2.0 */ -"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="stormpath.templates"),function(a,b,c){b.module("stormpath.templates",["spEmailVerification.tpl.html","spLoginForm.tpl.html","spPasswordResetForm.tpl.html","spPasswordResetRequestForm.tpl.html","spRegistrationForm.tpl.html"]),b.module("spEmailVerification.tpl.html",[]).run(["$templateCache",function(a){a.put("spEmailVerification.tpl.html",'

We are verifying your account

Your account has has been verified! Login Now.

We have sent a new verification message to your email address, please check your email for this message.

This email verification link is not valid. If you need us to re-send an email verification message, please enter your email address or username below.
Sorry, there was a problem with that email or username. Please try again.

')}]),b.module("spLoginForm.tpl.html",[]).run(["$templateCache",function(a){a.put("spLoginForm.tpl.html",'
Loading...

Or login with:

')}]),b.module("spPasswordResetForm.tpl.html",[]).run(["$templateCache",function(a){a.put("spPasswordResetForm.tpl.html",'

We are verifying this link

Your new password has been set. Please Login Now.

This password reset link is not valid. You may request another link by clicking here.

')}]),b.module("spPasswordResetRequestForm.tpl.html",[]).run(["$templateCache",function(a){a.put("spPasswordResetRequestForm.tpl.html",'

We have sent a password reset link to the email address of the account that you specified. Please check your email for this message, then click on the link.

Back to Login

')}]),b.module("spRegistrationForm.tpl.html",[]).run(["$templateCache",function(a){a.put("spRegistrationForm.tpl.html",'

Your account has been created. Please check your email for a verification link.

Back to Login

Your account has been created. Login Now.

Loading...

Or register with:

')}])}(window,window.angular); \ No newline at end of file +"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="stormpath.templates"),function(a,b,c){b.module("stormpath.templates",["spEmailVerification.tpl.html","spLoginForm.tpl.html","spPasswordResetForm.tpl.html","spPasswordResetRequestForm.tpl.html","spRegistrationForm.tpl.html"]),b.module("spEmailVerification.tpl.html",[]).run(["$templateCache",function(a){a.put("spEmailVerification.tpl.html",'

We are verifying your account

Your account has has been verified! Login Now.

We have sent a new verification message to your email address, please check your email for this message.

This email verification link is not valid. If you need us to re-send an email verification message, please enter your email address or username below.
Sorry, there was a problem with that email or username. Please try again.

')}]),b.module("spLoginForm.tpl.html",[]).run(["$templateCache",function(a){a.put("spLoginForm.tpl.html",'
Loading...

Or login with:

')}]),b.module("spPasswordResetForm.tpl.html",[]).run(["$templateCache",function(a){a.put("spPasswordResetForm.tpl.html",'

We are verifying this link

Your new password has been set. Please Login Now.

This password reset link is not valid. You may request another link by clicking here.

')}]),b.module("spPasswordResetRequestForm.tpl.html",[]).run(["$templateCache",function(a){a.put("spPasswordResetRequestForm.tpl.html",'

We have sent a password reset link to the email address of the account that you specified. Please check your email for this message, then click on the link.

Back to Login

')}]),b.module("spRegistrationForm.tpl.html",[]).run(["$templateCache",function(a){a.put("spRegistrationForm.tpl.html",'

Your account has been created. Please check your email for a verification link.

Back to Login

Your account has been created. Login Now.

Loading...

Or register with:

')}])}(window,window.angular); \ No newline at end of file diff --git a/src/spEmailVerification.tpl.html b/src/spEmailVerification.tpl.html index 5a09621..96da4f5 100644 --- a/src/spEmailVerification.tpl.html +++ b/src/spEmailVerification.tpl.html @@ -3,7 +3,7 @@

We are verifying your account

Your account has has been verified! - Login Now. + Login Now.

We have sent a new verification message to your email address, please check your email for this message. @@ -25,7 +25,7 @@

- +
diff --git a/src/spLoginForm.tpl.html b/src/spLoginForm.tpl.html index 9940c72..8b8a3f9 100644 --- a/src/spLoginForm.tpl.html +++ b/src/spLoginForm.tpl.html @@ -49,7 +49,7 @@
diff --git a/src/spPasswordResetForm.tpl.html b/src/spPasswordResetForm.tpl.html index 98c6471..ed07164 100644 --- a/src/spPasswordResetForm.tpl.html +++ b/src/spPasswordResetForm.tpl.html @@ -1,10 +1,10 @@

We are verifying this link

-

Your new password has been set. Please Login Now.

+

Your new password has been set. Please Login Now.

This password reset link is not valid. You may request another - link by clicking here. + link by clicking here.
diff --git a/src/spPasswordResetRequestForm.tpl.html b/src/spPasswordResetRequestForm.tpl.html index 798f603..3223860 100644 --- a/src/spPasswordResetRequestForm.tpl.html +++ b/src/spPasswordResetRequestForm.tpl.html @@ -5,7 +5,7 @@ Please check your email for this message, then click on the link.

- Back to Login + Back to Login

diff --git a/src/spRegistrationForm.tpl.html b/src/spRegistrationForm.tpl.html index 3d6f683..64846c7 100644 --- a/src/spRegistrationForm.tpl.html +++ b/src/spRegistrationForm.tpl.html @@ -37,9 +37,9 @@

Your account has been created. Please check your email for a verification link.

- Back to Login + Back to Login

-

Your account has been created. Login Now.

+

Your account has been created. Login Now.

diff --git a/src/stormpath.emailverification.js b/src/stormpath.emailverification.js index 2ef74b0..85adf0f 100644 --- a/src/stormpath.emailverification.js +++ b/src/stormpath.emailverification.js @@ -42,6 +42,9 @@ angular.module('stormpath') $scope.posting = false; }); }; + $scope.login = function(){ + $location.path('/login') + }; }]) /** diff --git a/src/stormpath.login.js b/src/stormpath.login.js index dfe6290..76d7cdc 100644 --- a/src/stormpath.login.js +++ b/src/stormpath.login.js @@ -2,7 +2,7 @@ angular.module('stormpath') -.controller('SpLoginFormCtrl', ['$scope','$auth','$viewModel',function ($scope,$auth,$viewModel) { +.controller('SpLoginFormCtrl', ['$scope','$auth','$location','$viewModel',function ($scope,$auth,$location,$viewModel) { $scope.viewModel = null; $viewModel.getLoginModel().then(function (model) { @@ -30,6 +30,9 @@ angular.module('stormpath') $scope.error = err.message; }); }; + $scope.forgot = function(){ + $location.path('/forgot') + }; }]) diff --git a/src/stormpath.passwordreset.js b/src/stormpath.passwordreset.js index dbedf6e..b7bff5a 100644 --- a/src/stormpath.passwordreset.js +++ b/src/stormpath.passwordreset.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('stormpath') -.controller('SpPasswordResetRequestCtrl', ['$scope','$user',function ($scope,$user) { +.controller('SpPasswordResetRequestCtrl', ['$scope','$location','$user',function ($scope,$location,$user) { $scope.sent = false; $scope.posting = false; $scope.formModel = { @@ -21,6 +21,12 @@ angular.module('stormpath') $scope.posting = false; }); }; + $scope.forgot = function(){ + $location.path('/forgot'); + }; + $scope.login = function(){ + $location.path('/login'); + }; }]) .controller('SpPasswordResetCtrl', ['$scope','$location','$user',function ($scope,$location,$user) { @@ -71,7 +77,9 @@ angular.module('stormpath') $scope.posting = false; }); }; - + $scope.login = function(){ + $location.path('/login'); + }; }]) /** diff --git a/src/stormpath.registration.js b/src/stormpath.registration.js index 636e9dd..0357e14 100644 --- a/src/stormpath.registration.js +++ b/src/stormpath.registration.js @@ -61,6 +61,9 @@ angular.module('stormpath') $scope.error = err.message; }); }; + $scope.login = function(){ + $location.path('/login'); + }; }]) @@ -177,4 +180,4 @@ angular.module('stormpath') scope.postLoginState = attrs.postLoginState || ''; } }; -}); \ No newline at end of file +}); From 5832c0cd2ad81c72e39e744b41bf441cf0d8e2b5 Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Mon, 24 Oct 2016 15:15:05 -0600 Subject: [PATCH 3/3] Revert changes to dist --- dist/stormpath-sdk-angularjs.js | 24 +++--------------------- dist/stormpath-sdk-angularjs.min.js | 2 +- dist/stormpath-sdk-angularjs.tpls.js | 10 +++++----- dist/stormpath-sdk-angularjs.tpls.min.js | 2 +- 4 files changed, 10 insertions(+), 28 deletions(-) diff --git a/dist/stormpath-sdk-angularjs.js b/dist/stormpath-sdk-angularjs.js index ea18c81..e723a24 100644 --- a/dist/stormpath-sdk-angularjs.js +++ b/dist/stormpath-sdk-angularjs.js @@ -1914,9 +1914,6 @@ angular.module('stormpath') $scope.posting = false; }); }; - $scope.login = function(){ - $location.path('/login') - }; }]) /** @@ -2129,7 +2126,7 @@ angular.module('stormpath') angular.module('stormpath') -.controller('SpLoginFormCtrl', ['$scope','$auth','$location','$viewModel',function ($scope,$auth,$location,$viewModel) { +.controller('SpLoginFormCtrl', ['$scope','$auth','$viewModel',function ($scope,$auth,$viewModel) { $scope.viewModel = null; $viewModel.getLoginModel().then(function (model) { @@ -2157,9 +2154,6 @@ angular.module('stormpath') $scope.error = err.message; }); }; - $scope.forgot = function(){ - $location.path('/forgot') - }; }]) @@ -2212,7 +2206,7 @@ angular.module('stormpath') 'use strict'; angular.module('stormpath') -.controller('SpPasswordResetRequestCtrl', ['$scope','$location','$user',function ($scope,$location,$user) { +.controller('SpPasswordResetRequestCtrl', ['$scope','$user',function ($scope,$user) { $scope.sent = false; $scope.posting = false; $scope.formModel = { @@ -2232,12 +2226,6 @@ angular.module('stormpath') $scope.posting = false; }); }; - $scope.forgot = function(){ - $location.path('/forgot'); - }; - $scope.login = function(){ - $location.path('/login'); - }; }]) .controller('SpPasswordResetCtrl', ['$scope','$location','$user',function ($scope,$location,$user) { @@ -2288,9 +2276,7 @@ angular.module('stormpath') $scope.posting = false; }); }; - $scope.login = function(){ - $location.path('/login'); - }; + }]) /** @@ -2441,9 +2427,6 @@ angular.module('stormpath') $scope.error = err.message; }); }; - $scope.login = function(){ - $location.path('/login'); - }; }]) @@ -2561,7 +2544,6 @@ angular.module('stormpath') } }; }); - (function() { 'use strict'; diff --git a/dist/stormpath-sdk-angularjs.min.js b/dist/stormpath-sdk-angularjs.min.js index bda198b..227a1ec 100644 --- a/dist/stormpath-sdk-angularjs.min.js +++ b/dist/stormpath-sdk-angularjs.min.js @@ -6,4 +6,4 @@ * @link https://github.com/stormpath/stormpath-sdk-angularjs * @license Apache-2.0 */ -"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="stormpath"),function(a,b,c){"use strict";b.module("stormpath",["stormpath.CONFIG","stormpath.auth","stormpath.userService","stormpath.viewModelService","stormpath.socialLogin","stormpath.facebookLogin","stormpath.googleLogin"]).factory("SpAuthInterceptor",[function(){function a(){}return a.prototype.request=function(a){return a.withCredentials=!0,a},new a}]).factory("StormpathAgentInterceptor",["$window",function(a){function c(b){var c=a.document.createElement("a");return c.href=b,c}function d(){}return d.prototype.request=function(d){var e=c(d.url),f=a.location;return e.host===f.host&&(d.headers["X-Stormpath-Agent"]="stormpath-sdk-angularjs/1.1.0 angularjs/"+b.version.full),d},new d}]).config(["$httpProvider",function(a){a.interceptors.push("SpAuthInterceptor"),a.interceptors.push("StormpathAgentInterceptor")}]).provider("$stormpath",[function(){this.$get=["$user","$injector","STORMPATH_CONFIG","$rootScope","$location",function(a,b,c,d,e){function f(){var a=new l;return this.encodeUrlForm=a.encode.bind(a),b.has("$state")&&(m=b.get("$state")),b.has("$route")&&(n=b.get("$route")),this}function g(a,b){d.$broadcast(c.STATE_CHANGE_UNAUTHENTICATED,a,b)}function h(a,b){d.$broadcast(c.STATE_CHANGE_UNAUTHORIZED,a,b)}function i(b){var c=b;return c&&c.authorize&&c.authorize.group?a.currentUser.inGroup(c.authorize.group):(console.error("Unknown authorize configuration for spStateConfig",b),!1)}function j(a){d.$broadcast(c.ROUTE_CHANGE_UNAUTHENTICATED,a)}function k(a){d.$broadcast(c.ROUTE_CHANGE_UNAUTHORIZED,a)}function l(){return this.delimiter="&",this.arrayPrefixGenerators={brackets:function(a){return a+"[]"},indices:function(a,b){return a+"["+b+"]"},repeat:function(a){return a}},this}var m,n;return f.prototype.stateChangeInterceptor=function(b){d.$on("$stateChangeStart",function(c,d,e){var f=d.sp||{};!f.authenticate&&!f.authorize||a.currentUser?f.waitForUser&&null===a.currentUser?(c.preventDefault(),a.get()["finally"](function(){m.go(d.name,e)})):a.currentUser&&f.authorize?i(f)||(c.preventDefault(),h(d,e)):d.name===b.loginState&&a.currentUser!==!1&&(c.preventDefault(),a.get()["finally"](function(){a.currentUser&&a.currentUser.href?m.go(b.defaultPostLoginState):m.go(d.name,e)})):(c.preventDefault(),a.get().then(function(){f.authorize?i(f)?m.go(d.name,e):h(d,e):m.go(d.name,e)},function(){g(d,e)}))})},f.prototype.routeChangeInterceptor=function(b){function c(a){setTimeout(function(){a.$$route.originalPath===e.path()?n.reload():e.path(a)})}d.$on("$routeChangeStart",function(d,e){if(e.$$route){var f=e.$$route.sp||{};!f.authenticate&&!f.authorize||a.currentUser?f.waitForUser&&null===a.currentUser?(d.preventDefault(),a.get()["finally"](function(){c(e)})):a.currentUser&&f.authorize?i(f)||(d.preventDefault(),k(e)):e.$$route.originalPath===b.loginRoute&&a.currentUser&&a.currentUser.href&&(d.preventDefault(),c(b.defaultPostLoginRoute)):(d.preventDefault(),a.get().then(function(){f.authorize?i(f)?c(e):h(e):c(e)},function(){j(e)}))}})},f.prototype.uiRouter=function(a){var b=this;a="object"==typeof a?a:{},this.stateChangeInterceptor(a),a.loginState&&(b.unauthenticatedWather=d.$on(c.STATE_CHANGE_UNAUTHENTICATED,function(c,d,e){b.postLogin={toState:d,toParams:e},m.go(a.loginState)})),d.$on(c.AUTHENTICATION_SUCCESS_EVENT_NAME,function(){b.postLogin&&a.autoRedirect!==!1?m.go(b.postLogin.toState,b.postLogin.toParams).then(function(){b.postLogin=null}):a.defaultPostLoginState&&m.go(a.defaultPostLoginState)}),a.forbiddenState&&(b.forbiddenWatcher=d.$on(c.STATE_CHANGE_UNAUTHORIZED,function(){m.go(a.forbiddenState)}))},f.prototype.ngRouter=function(a){var b=this;a="object"==typeof a?a:{},this.routeChangeInterceptor(a),a.loginRoute&&(this.unauthenticatedWather=d.$on(c.ROUTE_CHANGE_UNAUTHENTICATED,function(c,d){b.postLogin={toRoute:d},e.path(a.loginRoute)})),d.$on(c.AUTHENTICATION_SUCCESS_EVENT_NAME,function(){b.postLogin&&a.autoRedirect!==!1?(e.path(b.postLogin.toRoute),b.postLogin=null):a.defaultPostLoginRoute&&e.path(a.defaultPostLoginRoute)}),a.forbiddenRoute&&(this.forbiddenWatcher=d.$on(c.ROUTE_CHANGE_UNAUTHORIZED,function(){e.path(a.forbiddenRoute)}))},f.prototype.regexAttrParser=function(a){var b;return b=a instanceof RegExp?a:a&&/^\/.+\/[gim]?$/.test(a)?new RegExp(a.split("/")[1],a.split("/")[2]):a},l.prototype.stringify=function(a,b,c){if(a instanceof Date?a=a.toISOString():null===a&&(a=""),"string"==typeof a||"number"==typeof a||"boolean"==typeof a)return[encodeURIComponent(b)+"="+encodeURIComponent(a)];var d=[];if("undefined"==typeof a)return d;for(var e=Object.keys(a),f=0,g=e.length;f-1}),a.viewModel=b})["catch"](function(a){throw new Error("Could not load login view model from back-end: "+a.message)}),a.formModel={},a.posting=!1,a.submit=function(){a.posting=!0,a.error=null,b.authenticate(a.formModel)["catch"](function(b){a.posting=!1,a.error=b.message})},a.forgot=function(){c.path("/forgot")}}]).directive("spLoginForm",function(){return{templateUrl:function(a,b){return b.templateUrl||"spLoginForm.tpl.html"},controller:"SpLoginFormCtrl"}}),b.module("stormpath").controller("SpPasswordResetRequestCtrl",["$scope","$location","$user",function(a,b,c){a.sent=!1,a.posting=!1,a.formModel={username:""},a.error=null,a.submit=function(){a.posting=!0,a.error=null,c.passwordResetRequest({email:a.formModel.email}).then(function(){a.sent=!0})["catch"](function(b){a.error=b.message})["finally"](function(){a.posting=!1})},a.forgot=function(){b.path("/forgot")},a.login=function(){b.path("/login")}}]).controller("SpPasswordResetCtrl",["$scope","$location","$user",function(a,b,c){var d=b.search().sptoken;a.showVerificationError=!1,a.verifying=!1,a.verified=!1,a.posting=!1,a.reset=!1,a.error=null,a.resendFailed=!1,a.formModel={password:"",confirmPassword:""},"string"==typeof d?(a.verifying=!0,c.verifyPasswordResetToken(d).then(function(){a.verified=!0})["catch"](function(){a.showVerificationError=!0})["finally"](function(){a.verifying=!1})):a.showVerificationError=!0,a.submit=function(){return a.formModel.password!==a.formModel.confirmPassword?void(a.error="Passwords do not match"):(a.posting=!0,a.error=null,a.showVerificationError=!1,void c.resetPassword(d,{password:a.formModel.password}).then(function(){a.reset=!0})["catch"](function(b){a.error=b.message})["finally"](function(){a.posting=!1}))},a.login=function(){b.path("/login")}}]).directive("spPasswordResetRequestForm",function(){return{templateUrl:function(a,b){return b.templateUrl||"spPasswordResetRequestForm.tpl.html"},controller:"SpPasswordResetRequestCtrl"}}).directive("spPasswordResetForm",function(){return{templateUrl:function(a,b){return b.templateUrl||"spPasswordResetForm.tpl.html"},controller:"SpPasswordResetCtrl"}}),b.module("stormpath").controller("SpRegistrationFormCtrl",["$scope","$user","$auth","$location","$viewModel","$injector",function(a,b,c,d,e,f){a.formModel="object"==typeof a.formModel?a.formModel:{},a.created=!1,a.enabled=!1,a.creating=!1,a.authenticating=!1,a.viewModel=null,e.getRegisterModel().then(function(b){var c=["facebook","google"];b.accountStores=b.accountStores.filter(function(a){var b=a.provider.providerId;return c.indexOf(b)>-1}),a.viewModel=b})["catch"](function(a){throw new Error("Could not load login view model from back-end: "+a.message)}),a.submit=function(){a.creating=!0,a.error=null,b.create(a.formModel).then(function(b){a.created=!0,a.enabled="ENABLED"===b.status,a.enabled&&a.autoLogin?(a.authenticating=!0,c.authenticate({username:a.formModel.email,password:a.formModel.password}).then(function(){var b=f.has("$state")?f.get("$state"):null;a.postLoginState&&b?b.go(a.postLoginState):a.postLoginPath&&d.path(a.postLoginPath)})["catch"](function(b){a.error=b.message})["finally"](function(){a.authenticating=!1,a.creating=!1})):a.creating=!1})["catch"](function(b){a.creating=!1,a.error=b.message})},a.login=function(){d.path("/login")}}]).directive("spRegistrationForm",function(){return{templateUrl:function(a,b){return b.templateUrl||"spRegistrationForm.tpl.html"},controller:"SpRegistrationFormCtrl",link:function(a,b,c){a.autoLogin="true"===c.autoLogin,a.postLoginPath=c.postLoginPath||"",a.postLoginState=c.postLoginState||""}}}),function(){function c(a,b){switch(b.status){case"connected":a.resolve({providerData:{providerId:"facebook",accessToken:b.authResponse.accessToken}});break;case"not_authorized":a.reject(new Error("Please log into this app"));break;default:a.reject(new Error("Please log into Facebook."))}}function d(a,b){this.name="Facebook",this.clientId=null,this.$q=a,this.$spJsLoader=b}d.prototype.init=function(){var b=this.clientId;a.fbAsyncInit=function(){FB.init({appId:b,status:!0,cookie:!0,xfbml:!0,version:"v2.4"})},a.FB?a.fbAsyncInit():this.$spJsLoader.load("facebook-jssdk","//connect.facebook.net/en_US/sdk.js")},d.prototype.login=function(a){var b=this.$q.defer();return FB.login(c.bind(null,b),a),b.promise},b.module("stormpath.facebookLogin",[]).provider("$facebookLogin",function(){this.$get=["$q","$spJsLoader",function(a,b){return new d(a,b)}]})}(),function(){function a(a,b){this.name="Google",this.clientId=null,this.googleAuth=null,this.$q=a,this.$spJsLoader=b}a.prototype.setGoogleAuth=function(a){this.googleAuth=a},a.prototype.init=function(a){var b=this.clientId,c=this.setGoogleAuth.bind(this);this.$spJsLoader.load("google-jssdk","//apis.google.com/js/api:client.js").then(function(){gapi.load("auth2",function(){var a=gapi.auth2.init({client_id:b,cookiepolicy:"single_host_origin"});c(a)})})},a.prototype.login=function(a){var b=this.$q.defer();return a=a||{},a.redirect_uri="postmessage",this.googleAuth.grantOfflineAccess(a).then(function(a){b.resolve({providerData:{providerId:"google",code:a.code}})},function(a){b.reject(a)}),b.promise},b.module("stormpath.googleLogin",[]).provider("$googleLogin",function(){this.$get=["$q","$spJsLoader",function(b,c){return new a(b,c)}]})}(),function(){function a(a,b,c,d){this.providersPromise=null,this.STORMPATH_CONFIG=a,this.$injector=b,this.$http=c,this.$q=d}b.module("stormpath.socialLogin",["stormpath.CONFIG"]).config(["$injector","STORMPATH_CONFIG",function(b,c){var d=["$http","$q","$injector",function(b,d,e){return new a(c,e,b,d)}];b.get("$provide").factory(c.SOCIAL_LOGIN_SERVICE_NAME,d)}]).factory("$spJsLoader",["$q",function(a){return{load:function(b,c,d){var e=a.defer(),f=document.getElementsByTagName("script")[0],g=document.createElement("script");return document.getElementById(b)?e.resolve():(g.id=b,g.src=c,g.innerHTML=d,g.onload=e.resolve,f.parentNode.insertBefore(g,f)),e.promise}}}]).directive("spSocialLogin",["$viewModel","$auth","$injector",function(a,b,c){return{link:function(a,d,e){var f,g=a.$parent;try{f=c.get("$"+e.spSocialLogin+"Login")}catch(h){return}f.clientId=e.spClientId,f.init(d),a.providerName=f.name,d.bind("click",function(){var a={scope:e.spScope};g.posting=!0,f.login(a).then(function(a){return b.authenticate(a)})["catch"](function(a){g.posting=!1,a.message?g.error=a.message:g.error="An error occured when communicating with server."})})}}}])}(),function(){function a(a){return"api_key: "+a+"\nauthorize: true"}function c(b,c){var d=a(c);b.load("linkedin-jssdk","//platform.linkedin.com/in.js",d)}function d(a,b){this.name="LinkedIn",this.clientId=null,this.$q=a,this.$spJsLoader=b}d.prototype.init=function(a){c(this.$spJsLoader,this.clientId)},d.prototype.login=function(a){var b=this.$q.defer();return IN.User.authorize(function(){b.resolve({providerData:{providerId:"linkedin",accessToken:IN.ENV.auth.oauth_token}})}),b.promise},b.module("stormpath.linkedinLogin",[]).provider("$linkedinLogin",function(){this.$get=["$q","$spJsLoader",function(a,b){return new d(a,b)}]})}(),b.module("stormpath.userService",["stormpath.CONFIG"]).provider("$user",[function(){function a(a){var b=this;Object.keys(a).map(function(c){b[c]=a[c]})}a.prototype.inGroup=function(a){return this.groups.items.filter(function(b){return b.name===a}).length>0},a.prototype.matchesGroupExpression=function(a){return this.groups.items.filter(function(b){return a.test(b.name)}).length>0},a.prototype.groupTest=function(a){return!!(a instanceof RegExp&&this.matchesGroupExpression(a))||!!this.inGroup(a)},this.$get=["$q","$http","STORMPATH_CONFIG","$rootScope","$spFormEncoder","$spErrorTransformer",function(b,c,d,e,f,g){function h(){return this.cachedUserOp=null,this.currentUser=null,this}function i(a){e.$broadcast(d.REGISTERED_EVENT_NAME,a)}function j(a){e.$broadcast(d.GET_USER_EVENT,a)}function k(){e.$broadcast(d.NOT_LOGGED_IN_EVENT)}h.prototype.create=function(a){return c(f.formPost({url:d.getUrl("REGISTER_URI"),method:"POST",data:a})).then(function(a){var c=a.data.account||a.data;return i(c),b.resolve(c)},function(a){return b.reject(g.transformError(a))})},h.prototype.get=function(e){var f=b.defer(),g=this;return g.cachedUserOp?g.cachedUserOp.promise:null!==g.currentUser&&g.currentUser!==!1&&e!==!0?(f.resolve(g.currentUser),f.promise):(g.cachedUserOp=f,c.get(d.getUrl("CURRENT_USER_URI"),{withCredentials:!0}).then(function(b){g.cachedUserOp=null,g.currentUser=new a(b.data.account||b.data),j(g.currentUser),f.resolve(g.currentUser)},function(a){g.currentUser=!1,401===a.status&&k(),g.cachedUserOp=null,f.reject(a)}),f.promise)},h.prototype.resendVerificationEmail=function(a){return c({method:"POST",url:d.getUrl("EMAIL_VERIFICATION_ENDPOINT"),data:a})},h.prototype.verify=function(a){return c({url:d.getUrl("EMAIL_VERIFICATION_ENDPOINT")+"?sptoken="+a})},h.prototype.verifyPasswordResetToken=function(a){return c.get(d.getUrl("CHANGE_PASSWORD_ENDPOINT")+"?sptoken="+a)},h.prototype.passwordResetRequest=function(a){return c(f.formPost({method:"POST",url:d.getUrl("FORGOT_PASSWORD_ENDPOINT"),data:a}))["catch"](function(a){return b.reject(g.transformError(a))})},h.prototype.resetPassword=function(a,e){return e.sptoken=a,c(f.formPost({method:"POST",url:d.getUrl("CHANGE_PASSWORD_ENDPOINT"),data:e}))["catch"](function(a){return b.reject(g.transformError(a))})};var l=new h;return e.$on(d.SESSION_END_EVENT,function(){l.currentUser=!1}),l}]}]),function(){function a(a,b){this.$http=a,this.STORMPATH_CONFIG=b}a.prototype.getLoginModel=function(){return this.$http.get(this.STORMPATH_CONFIG.getUrl("AUTHENTICATION_ENDPOINT"),{headers:{Accept:"application/json"}}).then(function(a){return a.data})},a.prototype.getRegisterModel=function(){return this.$http.get(this.STORMPATH_CONFIG.getUrl("REGISTER_URI"),{headers:{Accept:"application/json"}}).then(function(a){return a.data})},b.module("stormpath.viewModelService",[]).provider("$viewModel",function(){this.$get=["$http","STORMPATH_CONFIG",function(b,c){return new a(b,c)}]})}()}(window,window.angular); \ No newline at end of file +"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="stormpath"),function(a,b,c){"use strict";b.module("stormpath",["stormpath.CONFIG","stormpath.auth","stormpath.userService","stormpath.viewModelService","stormpath.socialLogin","stormpath.facebookLogin","stormpath.googleLogin"]).factory("SpAuthInterceptor",[function(){function a(){}return a.prototype.request=function(a){return a.withCredentials=!0,a},new a}]).factory("StormpathAgentInterceptor",["$window",function(a){function c(b){var c=a.document.createElement("a");return c.href=b,c}function d(){}return d.prototype.request=function(d){var e=c(d.url),f=a.location;return e.host===f.host&&(d.headers["X-Stormpath-Agent"]="stormpath-sdk-angularjs/1.1.0 angularjs/"+b.version.full),d},new d}]).config(["$httpProvider",function(a){a.interceptors.push("SpAuthInterceptor"),a.interceptors.push("StormpathAgentInterceptor")}]).provider("$stormpath",[function(){this.$get=["$user","$injector","STORMPATH_CONFIG","$rootScope","$location",function(a,b,c,d,e){function f(){var a=new l;return this.encodeUrlForm=a.encode.bind(a),b.has("$state")&&(m=b.get("$state")),b.has("$route")&&(n=b.get("$route")),this}function g(a,b){d.$broadcast(c.STATE_CHANGE_UNAUTHENTICATED,a,b)}function h(a,b){d.$broadcast(c.STATE_CHANGE_UNAUTHORIZED,a,b)}function i(b){var c=b;return c&&c.authorize&&c.authorize.group?a.currentUser.inGroup(c.authorize.group):(console.error("Unknown authorize configuration for spStateConfig",b),!1)}function j(a){d.$broadcast(c.ROUTE_CHANGE_UNAUTHENTICATED,a)}function k(a){d.$broadcast(c.ROUTE_CHANGE_UNAUTHORIZED,a)}function l(){return this.delimiter="&",this.arrayPrefixGenerators={brackets:function(a){return a+"[]"},indices:function(a,b){return a+"["+b+"]"},repeat:function(a){return a}},this}var m,n;return f.prototype.stateChangeInterceptor=function(b){d.$on("$stateChangeStart",function(c,d,e){var f=d.sp||{};!f.authenticate&&!f.authorize||a.currentUser?f.waitForUser&&null===a.currentUser?(c.preventDefault(),a.get()["finally"](function(){m.go(d.name,e)})):a.currentUser&&f.authorize?i(f)||(c.preventDefault(),h(d,e)):d.name===b.loginState&&a.currentUser!==!1&&(c.preventDefault(),a.get()["finally"](function(){a.currentUser&&a.currentUser.href?m.go(b.defaultPostLoginState):m.go(d.name,e)})):(c.preventDefault(),a.get().then(function(){f.authorize?i(f)?m.go(d.name,e):h(d,e):m.go(d.name,e)},function(){g(d,e)}))})},f.prototype.routeChangeInterceptor=function(b){function c(a){setTimeout(function(){a.$$route.originalPath===e.path()?n.reload():e.path(a)})}d.$on("$routeChangeStart",function(d,e){if(e.$$route){var f=e.$$route.sp||{};!f.authenticate&&!f.authorize||a.currentUser?f.waitForUser&&null===a.currentUser?(d.preventDefault(),a.get()["finally"](function(){c(e)})):a.currentUser&&f.authorize?i(f)||(d.preventDefault(),k(e)):e.$$route.originalPath===b.loginRoute&&a.currentUser&&a.currentUser.href&&(d.preventDefault(),c(b.defaultPostLoginRoute)):(d.preventDefault(),a.get().then(function(){f.authorize?i(f)?c(e):h(e):c(e)},function(){j(e)}))}})},f.prototype.uiRouter=function(a){var b=this;a="object"==typeof a?a:{},this.stateChangeInterceptor(a),a.loginState&&(b.unauthenticatedWather=d.$on(c.STATE_CHANGE_UNAUTHENTICATED,function(c,d,e){b.postLogin={toState:d,toParams:e},m.go(a.loginState)})),d.$on(c.AUTHENTICATION_SUCCESS_EVENT_NAME,function(){b.postLogin&&a.autoRedirect!==!1?m.go(b.postLogin.toState,b.postLogin.toParams).then(function(){b.postLogin=null}):a.defaultPostLoginState&&m.go(a.defaultPostLoginState)}),a.forbiddenState&&(b.forbiddenWatcher=d.$on(c.STATE_CHANGE_UNAUTHORIZED,function(){m.go(a.forbiddenState)}))},f.prototype.ngRouter=function(a){var b=this;a="object"==typeof a?a:{},this.routeChangeInterceptor(a),a.loginRoute&&(this.unauthenticatedWather=d.$on(c.ROUTE_CHANGE_UNAUTHENTICATED,function(c,d){b.postLogin={toRoute:d},e.path(a.loginRoute)})),d.$on(c.AUTHENTICATION_SUCCESS_EVENT_NAME,function(){b.postLogin&&a.autoRedirect!==!1?(e.path(b.postLogin.toRoute),b.postLogin=null):a.defaultPostLoginRoute&&e.path(a.defaultPostLoginRoute)}),a.forbiddenRoute&&(this.forbiddenWatcher=d.$on(c.ROUTE_CHANGE_UNAUTHORIZED,function(){e.path(a.forbiddenRoute)}))},f.prototype.regexAttrParser=function(a){var b;return b=a instanceof RegExp?a:a&&/^\/.+\/[gim]?$/.test(a)?new RegExp(a.split("/")[1],a.split("/")[2]):a},l.prototype.stringify=function(a,b,c){if(a instanceof Date?a=a.toISOString():null===a&&(a=""),"string"==typeof a||"number"==typeof a||"boolean"==typeof a)return[encodeURIComponent(b)+"="+encodeURIComponent(a)];var d=[];if("undefined"==typeof a)return d;for(var e=Object.keys(a),f=0,g=e.length;f-1}),a.viewModel=b})["catch"](function(a){throw new Error("Could not load login view model from back-end: "+a.message)}),a.formModel={},a.posting=!1,a.submit=function(){a.posting=!0,a.error=null,b.authenticate(a.formModel)["catch"](function(b){a.posting=!1,a.error=b.message})}}]).directive("spLoginForm",function(){return{templateUrl:function(a,b){return b.templateUrl||"spLoginForm.tpl.html"},controller:"SpLoginFormCtrl"}}),b.module("stormpath").controller("SpPasswordResetRequestCtrl",["$scope","$user",function(a,b){a.sent=!1,a.posting=!1,a.formModel={username:""},a.error=null,a.submit=function(){a.posting=!0,a.error=null,b.passwordResetRequest({email:a.formModel.email}).then(function(){a.sent=!0})["catch"](function(b){a.error=b.message})["finally"](function(){a.posting=!1})}}]).controller("SpPasswordResetCtrl",["$scope","$location","$user",function(a,b,c){var d=b.search().sptoken;a.showVerificationError=!1,a.verifying=!1,a.verified=!1,a.posting=!1,a.reset=!1,a.error=null,a.resendFailed=!1,a.formModel={password:"",confirmPassword:""},"string"==typeof d?(a.verifying=!0,c.verifyPasswordResetToken(d).then(function(){a.verified=!0})["catch"](function(){a.showVerificationError=!0})["finally"](function(){a.verifying=!1})):a.showVerificationError=!0,a.submit=function(){return a.formModel.password!==a.formModel.confirmPassword?void(a.error="Passwords do not match"):(a.posting=!0,a.error=null,a.showVerificationError=!1,void c.resetPassword(d,{password:a.formModel.password}).then(function(){a.reset=!0})["catch"](function(b){a.error=b.message})["finally"](function(){a.posting=!1}))}}]).directive("spPasswordResetRequestForm",function(){return{templateUrl:function(a,b){return b.templateUrl||"spPasswordResetRequestForm.tpl.html"},controller:"SpPasswordResetRequestCtrl"}}).directive("spPasswordResetForm",function(){return{templateUrl:function(a,b){return b.templateUrl||"spPasswordResetForm.tpl.html"},controller:"SpPasswordResetCtrl"}}),b.module("stormpath").controller("SpRegistrationFormCtrl",["$scope","$user","$auth","$location","$viewModel","$injector",function(a,b,c,d,e,f){a.formModel="object"==typeof a.formModel?a.formModel:{},a.created=!1,a.enabled=!1,a.creating=!1,a.authenticating=!1,a.viewModel=null,e.getRegisterModel().then(function(b){var c=["facebook","google"];b.accountStores=b.accountStores.filter(function(a){var b=a.provider.providerId;return c.indexOf(b)>-1}),a.viewModel=b})["catch"](function(a){throw new Error("Could not load login view model from back-end: "+a.message)}),a.submit=function(){a.creating=!0,a.error=null,b.create(a.formModel).then(function(b){a.created=!0,a.enabled="ENABLED"===b.status,a.enabled&&a.autoLogin?(a.authenticating=!0,c.authenticate({username:a.formModel.email,password:a.formModel.password}).then(function(){var b=f.has("$state")?f.get("$state"):null;a.postLoginState&&b?b.go(a.postLoginState):a.postLoginPath&&d.path(a.postLoginPath)})["catch"](function(b){a.error=b.message})["finally"](function(){a.authenticating=!1,a.creating=!1})):a.creating=!1})["catch"](function(b){a.creating=!1,a.error=b.message})}}]).directive("spRegistrationForm",function(){return{templateUrl:function(a,b){return b.templateUrl||"spRegistrationForm.tpl.html"},controller:"SpRegistrationFormCtrl",link:function(a,b,c){a.autoLogin="true"===c.autoLogin,a.postLoginPath=c.postLoginPath||"",a.postLoginState=c.postLoginState||""}}}),function(){function c(a,b){switch(b.status){case"connected":a.resolve({providerData:{providerId:"facebook",accessToken:b.authResponse.accessToken}});break;case"not_authorized":a.reject(new Error("Please log into this app"));break;default:a.reject(new Error("Please log into Facebook."))}}function d(a,b){this.name="Facebook",this.clientId=null,this.$q=a,this.$spJsLoader=b}d.prototype.init=function(){var b=this.clientId;a.fbAsyncInit=function(){FB.init({appId:b,status:!0,cookie:!0,xfbml:!0,version:"v2.4"})},a.FB?a.fbAsyncInit():this.$spJsLoader.load("facebook-jssdk","//connect.facebook.net/en_US/sdk.js")},d.prototype.login=function(a){var b=this.$q.defer();return FB.login(c.bind(null,b),a),b.promise},b.module("stormpath.facebookLogin",[]).provider("$facebookLogin",function(){this.$get=["$q","$spJsLoader",function(a,b){return new d(a,b)}]})}(),function(){function a(a,b){this.name="Google",this.clientId=null,this.googleAuth=null,this.$q=a,this.$spJsLoader=b}a.prototype.setGoogleAuth=function(a){this.googleAuth=a},a.prototype.init=function(a){var b=this.clientId,c=this.setGoogleAuth.bind(this);this.$spJsLoader.load("google-jssdk","//apis.google.com/js/api:client.js").then(function(){gapi.load("auth2",function(){var a=gapi.auth2.init({client_id:b,cookiepolicy:"single_host_origin"});c(a)})})},a.prototype.login=function(a){var b=this.$q.defer();return a=a||{},a.redirect_uri="postmessage",this.googleAuth.grantOfflineAccess(a).then(function(a){b.resolve({providerData:{providerId:"google",code:a.code}})},function(a){b.reject(a)}),b.promise},b.module("stormpath.googleLogin",[]).provider("$googleLogin",function(){this.$get=["$q","$spJsLoader",function(b,c){return new a(b,c)}]})}(),function(){function a(a,b,c,d){this.providersPromise=null,this.STORMPATH_CONFIG=a,this.$injector=b,this.$http=c,this.$q=d}b.module("stormpath.socialLogin",["stormpath.CONFIG"]).config(["$injector","STORMPATH_CONFIG",function(b,c){var d=["$http","$q","$injector",function(b,d,e){return new a(c,e,b,d)}];b.get("$provide").factory(c.SOCIAL_LOGIN_SERVICE_NAME,d)}]).factory("$spJsLoader",["$q",function(a){return{load:function(b,c,d){var e=a.defer(),f=document.getElementsByTagName("script")[0],g=document.createElement("script");return document.getElementById(b)?e.resolve():(g.id=b,g.src=c,g.innerHTML=d,g.onload=e.resolve,f.parentNode.insertBefore(g,f)),e.promise}}}]).directive("spSocialLogin",["$viewModel","$auth","$injector",function(a,b,c){return{link:function(a,d,e){var f,g=a.$parent;try{f=c.get("$"+e.spSocialLogin+"Login")}catch(h){return}f.clientId=e.spClientId,f.init(d),a.providerName=f.name,d.bind("click",function(){var a={scope:e.spScope};g.posting=!0,f.login(a).then(function(a){return b.authenticate(a)})["catch"](function(a){g.posting=!1,a.message?g.error=a.message:g.error="An error occured when communicating with server."})})}}}])}(),function(){function a(a){return"api_key: "+a+"\nauthorize: true"}function c(b,c){var d=a(c);b.load("linkedin-jssdk","//platform.linkedin.com/in.js",d)}function d(a,b){this.name="LinkedIn",this.clientId=null,this.$q=a,this.$spJsLoader=b}d.prototype.init=function(a){c(this.$spJsLoader,this.clientId)},d.prototype.login=function(a){var b=this.$q.defer();return IN.User.authorize(function(){b.resolve({providerData:{providerId:"linkedin",accessToken:IN.ENV.auth.oauth_token}})}),b.promise},b.module("stormpath.linkedinLogin",[]).provider("$linkedinLogin",function(){this.$get=["$q","$spJsLoader",function(a,b){return new d(a,b)}]})}(),b.module("stormpath.userService",["stormpath.CONFIG"]).provider("$user",[function(){function a(a){var b=this;Object.keys(a).map(function(c){b[c]=a[c]})}a.prototype.inGroup=function(a){return this.groups.items.filter(function(b){return b.name===a}).length>0},a.prototype.matchesGroupExpression=function(a){return this.groups.items.filter(function(b){return a.test(b.name)}).length>0},a.prototype.groupTest=function(a){return!!(a instanceof RegExp&&this.matchesGroupExpression(a))||!!this.inGroup(a)},this.$get=["$q","$http","STORMPATH_CONFIG","$rootScope","$spFormEncoder","$spErrorTransformer",function(b,c,d,e,f,g){function h(){return this.cachedUserOp=null,this.currentUser=null,this}function i(a){e.$broadcast(d.REGISTERED_EVENT_NAME,a)}function j(a){e.$broadcast(d.GET_USER_EVENT,a)}function k(){e.$broadcast(d.NOT_LOGGED_IN_EVENT)}h.prototype.create=function(a){return c(f.formPost({url:d.getUrl("REGISTER_URI"),method:"POST",data:a})).then(function(a){var c=a.data.account||a.data;return i(c),b.resolve(c)},function(a){return b.reject(g.transformError(a))})},h.prototype.get=function(e){var f=b.defer(),g=this;return g.cachedUserOp?g.cachedUserOp.promise:null!==g.currentUser&&g.currentUser!==!1&&e!==!0?(f.resolve(g.currentUser),f.promise):(g.cachedUserOp=f,c.get(d.getUrl("CURRENT_USER_URI"),{withCredentials:!0}).then(function(b){g.cachedUserOp=null,g.currentUser=new a(b.data.account||b.data),j(g.currentUser),f.resolve(g.currentUser)},function(a){g.currentUser=!1,401===a.status&&k(),g.cachedUserOp=null,f.reject(a)}),f.promise)},h.prototype.resendVerificationEmail=function(a){return c({method:"POST",url:d.getUrl("EMAIL_VERIFICATION_ENDPOINT"),data:a})},h.prototype.verify=function(a){return c({url:d.getUrl("EMAIL_VERIFICATION_ENDPOINT")+"?sptoken="+a})},h.prototype.verifyPasswordResetToken=function(a){return c.get(d.getUrl("CHANGE_PASSWORD_ENDPOINT")+"?sptoken="+a)},h.prototype.passwordResetRequest=function(a){return c(f.formPost({method:"POST",url:d.getUrl("FORGOT_PASSWORD_ENDPOINT"),data:a}))["catch"](function(a){return b.reject(g.transformError(a))})},h.prototype.resetPassword=function(a,e){return e.sptoken=a,c(f.formPost({method:"POST",url:d.getUrl("CHANGE_PASSWORD_ENDPOINT"),data:e}))["catch"](function(a){return b.reject(g.transformError(a))})};var l=new h;return e.$on(d.SESSION_END_EVENT,function(){l.currentUser=!1}),l}]}]),function(){function a(a,b){this.$http=a,this.STORMPATH_CONFIG=b}a.prototype.getLoginModel=function(){return this.$http.get(this.STORMPATH_CONFIG.getUrl("AUTHENTICATION_ENDPOINT"),{headers:{Accept:"application/json"}}).then(function(a){return a.data})},a.prototype.getRegisterModel=function(){return this.$http.get(this.STORMPATH_CONFIG.getUrl("REGISTER_URI"),{headers:{Accept:"application/json"}}).then(function(a){return a.data})},b.module("stormpath.viewModelService",[]).provider("$viewModel",function(){this.$get=["$http","STORMPATH_CONFIG",function(b,c){return new a(b,c)}]})}()}(window,window.angular); \ No newline at end of file diff --git a/dist/stormpath-sdk-angularjs.tpls.js b/dist/stormpath-sdk-angularjs.tpls.js index bbefeca..86be999 100644 --- a/dist/stormpath-sdk-angularjs.tpls.js +++ b/dist/stormpath-sdk-angularjs.tpls.js @@ -18,7 +18,7 @@ angular.module('stormpath.templates', ['spEmailVerification.tpl.html', 'spLoginF angular.module("spEmailVerification.tpl.html", []).run(["$templateCache", function($templateCache) { $templateCache.put("spEmailVerification.tpl.html", - "

We are verifying your account

Your account has has been verified! Login Now.

We have sent a new verification message to your email address, please check your email for this message.

This email verification link is not valid. If you need us to re-send an email verification message, please enter your email address or username below.
Sorry, there was a problem with that email or username. Please try again.

"); + "

We are verifying your account

Your account has has been verified! Login Now.

We have sent a new verification message to your email address, please check your email for this message.

This email verification link is not valid. If you need us to re-send an email verification message, please enter your email address or username below.
Sorry, there was a problem with that email or username. Please try again.

"); }]); angular.module("spLoginForm.tpl.html", []).run(["$templateCache", function($templateCache) { @@ -54,17 +54,17 @@ angular.module("spLoginForm.tpl.html", []).run(["$templateCache", function($temp "\n" + " .sp-loading {\n" + " text-align: center;\n" + - " }
Loading...

Or login with:

"); + " }
Loading...

Or login with:

"); }]); angular.module("spPasswordResetForm.tpl.html", []).run(["$templateCache", function($templateCache) { $templateCache.put("spPasswordResetForm.tpl.html", - "

We are verifying this link

Your new password has been set. Please Login Now.

This password reset link is not valid. You may request another link by clicking here.

"); + "

We are verifying this link

Your new password has been set. Please Login Now.

This password reset link is not valid. You may request another link by clicking here.

"); }]); angular.module("spPasswordResetRequestForm.tpl.html", []).run(["$templateCache", function($templateCache) { $templateCache.put("spPasswordResetRequestForm.tpl.html", - "

We have sent a password reset link to the email address of the account that you specified. Please check your email for this message, then click on the link.

Back to Login

"); + "

We have sent a password reset link to the email address of the account that you specified. Please check your email for this message, then click on the link.

Back to Login

"); }]); angular.module("spRegistrationForm.tpl.html", []).run(["$templateCache", function($templateCache) { @@ -100,6 +100,6 @@ angular.module("spRegistrationForm.tpl.html", []).run(["$templateCache", functio "\n" + " .sp-loading {\n" + " text-align: center;\n" + - " }

Your account has been created. Please check your email for a verification link.

Back to Login

Your account has been created. Login Now.

Loading...

Or register with:

"); + " }

Your account has been created. Please check your email for a verification link.

Back to Login

Your account has been created. Login Now.

Loading...

Or register with:

"); }]); })(window, window.angular); diff --git a/dist/stormpath-sdk-angularjs.tpls.min.js b/dist/stormpath-sdk-angularjs.tpls.min.js index 4b15d80..e4c6fbc 100644 --- a/dist/stormpath-sdk-angularjs.tpls.min.js +++ b/dist/stormpath-sdk-angularjs.tpls.min.js @@ -6,4 +6,4 @@ * @link https://github.com/stormpath/stormpath-sdk-angularjs * @license Apache-2.0 */ -"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="stormpath.templates"),function(a,b,c){b.module("stormpath.templates",["spEmailVerification.tpl.html","spLoginForm.tpl.html","spPasswordResetForm.tpl.html","spPasswordResetRequestForm.tpl.html","spRegistrationForm.tpl.html"]),b.module("spEmailVerification.tpl.html",[]).run(["$templateCache",function(a){a.put("spEmailVerification.tpl.html",'

We are verifying your account

Your account has has been verified! Login Now.

We have sent a new verification message to your email address, please check your email for this message.

This email verification link is not valid. If you need us to re-send an email verification message, please enter your email address or username below.
Sorry, there was a problem with that email or username. Please try again.

')}]),b.module("spLoginForm.tpl.html",[]).run(["$templateCache",function(a){a.put("spLoginForm.tpl.html",'
Loading...

Or login with:

')}]),b.module("spPasswordResetForm.tpl.html",[]).run(["$templateCache",function(a){a.put("spPasswordResetForm.tpl.html",'

We are verifying this link

Your new password has been set. Please Login Now.

This password reset link is not valid. You may request another link by clicking here.

')}]),b.module("spPasswordResetRequestForm.tpl.html",[]).run(["$templateCache",function(a){a.put("spPasswordResetRequestForm.tpl.html",'

We have sent a password reset link to the email address of the account that you specified. Please check your email for this message, then click on the link.

Back to Login

')}]),b.module("spRegistrationForm.tpl.html",[]).run(["$templateCache",function(a){a.put("spRegistrationForm.tpl.html",'

Your account has been created. Please check your email for a verification link.

Back to Login

Your account has been created. Login Now.

Loading...

Or register with:

')}])}(window,window.angular); \ No newline at end of file +"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="stormpath.templates"),function(a,b,c){b.module("stormpath.templates",["spEmailVerification.tpl.html","spLoginForm.tpl.html","spPasswordResetForm.tpl.html","spPasswordResetRequestForm.tpl.html","spRegistrationForm.tpl.html"]),b.module("spEmailVerification.tpl.html",[]).run(["$templateCache",function(a){a.put("spEmailVerification.tpl.html",'

We are verifying your account

Your account has has been verified! Login Now.

We have sent a new verification message to your email address, please check your email for this message.

This email verification link is not valid. If you need us to re-send an email verification message, please enter your email address or username below.
Sorry, there was a problem with that email or username. Please try again.

')}]),b.module("spLoginForm.tpl.html",[]).run(["$templateCache",function(a){a.put("spLoginForm.tpl.html",'
Loading...

Or login with:

')}]),b.module("spPasswordResetForm.tpl.html",[]).run(["$templateCache",function(a){a.put("spPasswordResetForm.tpl.html",'

We are verifying this link

Your new password has been set. Please Login Now.

This password reset link is not valid. You may request another link by clicking here.

')}]),b.module("spPasswordResetRequestForm.tpl.html",[]).run(["$templateCache",function(a){a.put("spPasswordResetRequestForm.tpl.html",'

We have sent a password reset link to the email address of the account that you specified. Please check your email for this message, then click on the link.

Back to Login

')}]),b.module("spRegistrationForm.tpl.html",[]).run(["$templateCache",function(a){a.put("spRegistrationForm.tpl.html",'

Your account has been created. Please check your email for a verification link.

Back to Login

Your account has been created. Login Now.

Loading...

Or register with:

')}])}(window,window.angular); \ No newline at end of file