diff --git a/src/sunstone/models/OpenNebula2FA/sunstone_2f_auth.rb b/src/sunstone/models/OpenNebula2FA/sunstone_2f_auth.rb index 31383f059a9..3a475dd8141 100644 --- a/src/sunstone/models/OpenNebula2FA/sunstone_2f_auth.rb +++ b/src/sunstone/models/OpenNebula2FA/sunstone_2f_auth.rb @@ -17,7 +17,7 @@ require 'sunstone_optp' # 2F Auth -module Suntone2FAuth +module Sunstone2FAuth def self.authenticate(secret, token) totp = SunstoneOPTP.build(secret, nil) diff --git a/src/sunstone/models/OpenNebulaJSON/UserJSON.rb b/src/sunstone/models/OpenNebulaJSON/UserJSON.rb index 921150bcee1..7eec7d27317 100644 --- a/src/sunstone/models/OpenNebulaJSON/UserJSON.rb +++ b/src/sunstone/models/OpenNebulaJSON/UserJSON.rb @@ -15,7 +15,7 @@ #--------------------------------------------------------------------------- # require 'OpenNebulaJSON/JSONUtils' -require 'suntone_2f_auth' +require 'sunstone_2f_auth' module OpenNebulaJSON class UserJSON < OpenNebula::User @@ -78,7 +78,7 @@ def update(params=Hash.new) end def enable_two_factor_auth(params=Hash.new) - unless Suntone2FAuth.authenticate(params["secret"], params["token"]) + unless Sunstone2FAuth.authenticate(params["secret"], params["token"]) return OpenNebula::Error.new("Invalid token.") end diff --git a/src/sunstone/sunstone-server.rb b/src/sunstone/sunstone-server.rb index 846079bd155..56b4b67f99b 100755 --- a/src/sunstone/sunstone-server.rb +++ b/src/sunstone/sunstone-server.rb @@ -101,7 +101,7 @@ require "sunstone_qr_code" require "sunstone_optp" -require "suntone_2f_auth" +require "sunstone_2f_auth" require 'CloudAuth' require 'SunstoneServer' require 'SunstoneViews' @@ -332,7 +332,7 @@ def build_session if !two_factor_auth_token || two_factor_auth_token == "" return [202, { code: "two_factor_auth" }.to_json] else - unless Suntone2FAuth.authenticate(user[TWO_FACTOR_AUTH_SECRET_XPATH], two_factor_auth_token) + unless Sunstone2FAuth.authenticate(user[TWO_FACTOR_AUTH_SECRET_XPATH], two_factor_auth_token) logger.info { "Unauthorized two factor authentication login attempt" } return [401, ""] end