diff --git a/js/hal/http/client.js b/js/hal/http/client.js index b78d12b..046d6bb 100644 --- a/js/hal/http/client.js +++ b/js/hal/http/client.js @@ -1,6 +1,8 @@ HAL.Http.Client = function(opts) { this.vent = opts.vent; this.defaultHeaders = { 'Accept': 'application/hal+json, application/json, */*; q=0.01' }; + cookie = document.cookie.match('(^|;)\\s*' + 'MyHalBrowserToken' + '\\s*=\\s*([^;]+)'); + cookie ? this.defaultHeaders.Authorization = 'Bearer ' + cookie.pop() : ''; this.headers = this.defaultHeaders; }; diff --git a/login.html b/login.html new file mode 100644 index 0000000..1284184 --- /dev/null +++ b/login.html @@ -0,0 +1,76 @@ + + +
+ +