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:
commit
8833d387f2
@ -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)
|
||||
|
||||
|
@ -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
|
||||
################################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user