Ignore:
Timestamp:
06/26/13 21:17:41 (12 years ago)
Author:
hendrikvanantwerpen
Message:

Improved authentication

  • Authentication cannot be cancelled, removing a lot of weird race conditions.
  • We offer a request provider that has automatic retry in case of authentication failures.
  • Reduced dependency on LoginDialog? by having it act independent based on events. Other modules can just depend on 'session'.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/src/client/qed-client/store/CouchStore.js

    r466 r468  
    2828        _responseIdProperty: "id",
    2929        _responseRevProperty: "rev",
     30        request: request,
    3031        constructor: function(options){
    3132            declare.safeMixin(this, options);
     
    3940        info: function(){
    4041            var dfd = new Deferred();
    41             request(this.target, {
     42            this.request(this.target, {
    4243                method: "GET",
    4344                handleAs: "json",
     
    5859        get: function(id){
    5960            var dfd = new Deferred();
    60             request(this.target + encodeURIComponent(id), {
     61            this.request(this.target + encodeURIComponent(id), {
    6162                method: "GET",
    6263                handleAs: "json",
     
    103104            var id = options.id ? options.id : this.getIdentity(object);
    104105            var hasId = typeof id !== "undefined";
    105             request(hasId ? this.target + encodeURIComponent(id) : this.target, {
     106            this.request(hasId ? this.target + encodeURIComponent(id) : this.target, {
    106107                method: hasId ? "PUT" : "POST",
    107108                data: json.toJson(object),
     
    129130        remove: function(id,rev){
    130131            var dfd = new Deferred();
    131             request(this.target + encodeURIComponent(id), {
     132            this.request(this.target + encodeURIComponent(id), {
    132133                method: "DELETE",
    133134                headers: {
     
    243244            }
    244245           
    245             request(this.target + query, {
     246            this.request(this.target + query, {
    246247                method: "GET",
    247248                handleAs: "json",
Note: See TracChangeset for help on using the changeset viewer.