Sha256: e0023159b5410861707682b2a0bdd98ad1bb4c9d1d38c8eca24712f7d4eedc20

Contents?: true

Size: 545 Bytes

Versions: 61

Compression:

Stored size: 545 Bytes

Contents

module Spider; module Auth
    
    module HTTPBasicAuth
        include HTTP
        
        def before(action='', *arguments)
            if (uid = check_basic_auth(LoginAuthenticator.new))
                @request.session['uid'] = uid
                Spider::Auth.current_user = uid
            end
            super
        end
        
        def try_rescue(exc)
            if (exc.is_a?(Unauthorized))
                challenge_basic_auth
            else
                super
            end
        end
        
    end
    
end; end

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
spiderfw-1.0.1 apps/core/auth/controllers/mixins/http_basic_auth.rb
spiderfw-1.0.0 apps/core/auth/controllers/mixins/http_basic_auth.rb
spiderfw-0.6.39 apps/core/auth/controllers/mixins/http_basic_auth.rb
spiderfw-0.6.38 apps/core/auth/controllers/mixins/http_basic_auth.rb
spiderfw-0.6.37 apps/core/auth/controllers/mixins/http_basic_auth.rb
spiderfw-0.6.35 apps/core/auth/controllers/mixins/http_basic_auth.rb
spiderfw-0.6.34 apps/core/auth/controllers/mixins/http_basic_auth.rb
spiderfw-0.6.33 apps/core/auth/controllers/mixins/http_basic_auth.rb
spiderfw-0.6.32 apps/core/auth/controllers/mixins/http_basic_auth.rb
spiderfw-0.6.31 apps/core/auth/controllers/mixins/http_basic_auth.rb
spiderfw-0.6.30 apps/core/auth/controllers/mixins/http_basic_auth.rb
spiderfw-0.6.29 apps/core/auth/controllers/mixins/http_basic_auth.rb
spiderfw-0.6.28 apps/core/auth/controllers/mixins/http_basic_auth.rb
spiderfw-0.6.27 apps/core/auth/controllers/mixins/http_basic_auth.rb
spiderfw-0.6.26 apps/core/auth/controllers/mixins/http_basic_auth.rb
spiderfw-0.6.26.pre1 apps/core/auth/controllers/mixins/http_basic_auth.rb
spiderfw-0.6.25 apps/core/auth/controllers/mixins/http_basic_auth.rb
spiderfw-0.6.24 apps/core/auth/controllers/mixins/http_basic_auth.rb
spiderfw-0.6.23 apps/core/auth/controllers/mixins/http_basic_auth.rb
spiderfw-0.6.22 apps/core/auth/controllers/mixins/http_basic_auth.rb