mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
Signed-off-by: Ricardo Diaz <rdiaz@opennebula.io> (cherry picked from commit 2d31acad9918b6143d17dd3a8e6930239e0d0473)
This commit is contained in:
parent
97a1770184
commit
78cbcfb2ac
@ -83,7 +83,8 @@ module OpenNebulaCloudAuth
|
||||
|
||||
# Check if the user authenticated with a scoped token. In this case
|
||||
# encode the EGID in the username as "user:egid"
|
||||
egid = user["//LOGIN_TOKEN [ TOKEN = \"#{password}\" ]/EGID"]
|
||||
egid = nil
|
||||
egid = user["//LOGIN_TOKEN [ TOKEN = \"#{password}\" ]/EGID"] if password.match(/^[a-z0-9]+$/)
|
||||
|
||||
auth_name = user.name
|
||||
auth_name = "#{auth_name}:#{egid}" if egid
|
||||
|
Loading…
x
Reference in New Issue
Block a user