Good day.
I use one.user.login method to create new tokens but can’t find appropriate method to delete existing not needed tokens. Can somebody drop a hint which method should I use to delete token ?
Opennebula version 5.10.
Good day.
I use one.user.login method to create new tokens but can’t find appropriate method to delete existing not needed tokens. Can somebody drop a hint which method should I use to delete token ?
Opennebula version 5.10.
Hello @romjer
You can use the same method:
# Sets the LOGIN_TOKEN for the user
#
# @param uname [String] of the user
# @param token [String] the login token, if empty OpenNebula will
# generate one
# @param expire [String] valid period of the token in secs. If == 0
# the token will be reset
# @param egid [Integer] Effective GID to use with this token. To use
# the current GID and user groups set it to -1
# @return [String, OpenNebula::Error] token in case of success, Error
# otherwise
def login(uname, token, expire, egid = -1)
return @client.call(USER_METHODS[:login], uname, token, expire, egid)
end
Put a 0 in expire parameter and the token will be removed.
Best,
Álex.