     ##
     ## 
     ##
-    class HttpSessions extends floyd.Context
+    class HttpSessions extends floyd.auth.AuthContext
         
         configure: (config)->
         
             @_hiddenKeys.push 'Registry', 'Session'
-            @_TOKENS = config.tokens
-  
             super new floyd.Config
             
                 data:

            
            @logger.debug 'session authenticate identity %s', identity.id
            
            identity.token (err, token)=>
                if err || !token
                    @logger.debug 'session authenticate NO TOKEN', identity.id
                     
                    return fn(err || new Error 'session authenticate NO TOKEN') 
                
                ##
                if @_TOKENS && @_TOKENS[identity.id.split('.').shift()] is token
                
                    @logger.debug 'found known Token, authenticate SUCCESS', identity.id 
                        
                    fn()
                
                else
                    sid = token.substr 40				
                    
                    @logger.fine 'session authenticate session %s', sid
    
                    @_load sid, (err, sess)=>
                        return fn(err) if err
                        
                        @logger.finer 'session authenticate hash %s', token.substr 0, 39
                        
                        if token is sess.token
                            
                            @logger.debug 'session authenticate SUCCESS', identity.id 
                            
                            fn()
                            
                        else
                            @logger.debug 'session authenticate FAILURE', identity.id 
                            
                            fn new Error 'session authenticate FAILURE'
                            
        

        ##
        ## 
        ##
        authorize: (token, fn)->            				
            
            if token && (sess = @_registry?.get (sid = token.substr 40))
                
                #console.log 'found session', sess, sess.public.user?.login

