1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-24 21:34:01 +03:00

Merge branch 'feature-2500'

This commit is contained in:
Javi Fontan 2013-11-27 15:22:38 +01:00
commit 8833d387f2
2 changed files with 18 additions and 0 deletions

View File

@ -14,6 +14,8 @@
# limitations under the License. #
#--------------------------------------------------------------------------- #
require 'uri'
module OpenNebulaCloudAuth
#
@ -33,6 +35,17 @@ module OpenNebulaCloudAuth
if auth.provided? && auth.basic?
username, password = auth.credentials
if @conf[:encode_user_password]
if defined?(URI::Parser)
parser=URI::Parser.new
else
parser=URI
end
username=parser.escape(username)
password=parser.escape(password)
end
client = OpenNebula::Client.new("#{username}:#{password}", @conf[:one_xmlrpc])
user = OpenNebula::User.new_with_id(OpenNebula::User::SELF, client)

View File

@ -71,6 +71,11 @@
#
:core_auth: cipher
# For LDAP auth. Encode credentials sent to OpenNebula. Turns espaces into %20.
# This only works with "opennebula" auth.
#
#:encode_user_password: true
################################################################################
# UI Settings
################################################################################