How to use the cookie.auth.token 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);
                }

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

                url = url.replace(';jsessionid=', ''); // remove it if no session
github Geomatys / constellation / modules / cstl-admin / grunt / src / js / services.js View on Github external
get : function(){
              console.log("TokenService.get: " + $.cookie(CstlConfig['cookie.auth.token']));
              return $.cookie(CstlConfig['cookie.auth.token']);
            },
            renew: function() {
github Geomatys / constellation / modules / cstl-admin / grunt / src / js / services.js View on Github external
get : function(){
              console.log("TokenService.get: " + $.cookie(CstlConfig['cookie.auth.token']));
              return $.cookie(CstlConfig['cookie.auth.token']);
            },
            renew: function() {