How to use the cookie.domain.id function in cookie

To help you get started, we’ve selected a few cookie examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Geomatys / constellation / modules / cstl-admin / grunt / src / js / services.js View on Github external
compileUrl: function(config, url, fillSessionId) {
                // Acquire cookie values.
                var cstlUrl   = $cookieStore.get(CstlConfig['cookie.cstl.url']),
                    domainId  = $cookieStore.get(CstlConfig['cookie.domain.id']),
                    userId    = $cookieStore.get(CstlConfig['cookie.user.id']);

                // Inject cstl-service webapp url.
                if (angular.isDefined(cstlUrl)) {
                    url = url.replace(CstlConfig['inject.expr.ctrl.url'], cstlUrl);
                    if(config){
                      config.headers.access_token = $.cookie(CstlConfig['cookie.auth.token']);
                    }
                }else if (/@cstl/.test(url)){
                  window.location.href="index.html";
                }

                // Inject domain id value.
                if (angular.isDefined(domainId)) {
                    url = url.replace(CstlConfig['inject.expr.domain.id'], domainId);
                }
github Geomatys / constellation / modules / cstl-admin / grunt / src / js / app-services.js View on Github external
compileUrl: function(url, fillSessionId) {
                // Acquire cookie values.
                var cstlUrl   = $cookies[CstlConfig['cookie.cstl.url']],
                    domainId  = $cookies[CstlConfig['cookie.domain.id']],
                    userId    = $cookies[CstlConfig['cookie.user.id']],
                    sessionId = $cookies[CstlConfig['cookie.session.id']];

                // Inject cstl-service webapp url.
                if (angular.isDefined(cstlUrl)) {
                    url = url.replace(CstlConfig['inject.expr.ctrl.url'], cstlUrl);
                }

                // Inject domain id value.
                if (angular.isDefined(domainId)) {
                    url = url.replace(CstlConfig['inject.expr.domain.id'], domainId);
                }

                // Inject user id value.
                if (angular.isDefined(userId)) {
                    url = url.replace(CstlConfig['inject.expr.user.id'], userId);
github Geomatys / constellation / modules / cstl-admin / grunt / src / js / app-index.js View on Github external
AppConfigService.getConfig(function(config) {
            $scope.cstlURL  = config.cstl;
            $cookieStore.put('cstlUrl', $scope.cstlURL, {});

            $scope.cstlLoginUrl  = config.cstlLoginURL || 'login.html';

            // default domain
            $cookieStore.put(CstlConfig['cookie.domain.id'], '1', {});

            Account.get({},function(response) {
                //already authenticated, redirect to administration page
                window.location.href="admin.html";
            });
        });
    })
github Geomatys / constellation / modules / cstl-admin / grunt / src / js / services.js View on Github external
clear: function(){
              $.removeCookie(CstlConfig['cookie.auth.token'], { path: '/' });
              $.removeCookie(CstlConfig['cookie.user.id'], { path: '/' });
              $.removeCookie(CstlConfig['cookie.domain.id'], { path: '/' });
            }
        };