Revision b61fa2cb src/cloud/common/CloudAuth/OpenNebulaCloudAuth.rb

View differences:

src/cloud/common/CloudAuth/OpenNebulaCloudAuth.rb
31 31
    #
32 32
    def do_auth(env, params={})
33 33
        auth = Rack::Auth::Basic::Request.new(env)
34

  
35 34
        if auth.provided? && auth.basic?
36 35
            username, password = auth.credentials
37

  
38 36
            authenticated = false
39 37

  
40 38
            invalid_chars =
......
72 70

  
73 71
                rc = user.info
74 72
            end
75

  
76 73
            if OpenNebula.is_error?(rc)
77 74
                if logger
78 75
                    logger.error{ "User #{username} could not be authenticated"}
79 76
                    logger.error { rc.message }
77
                    throw Exception(rc.message) if rc.is_exml_rpc_call?()
80 78
                end
81 79
                return nil
82 80
            end

Also available in: Unified diff