This method is deprecated or moved on the latest stable version.
The last existing version (v1_9_3_392) is shown here.
new(user = nil, domain = nil)
public
Creates a new
instance ready for authentication as the given user in the given domain.
Defaults to current user and domain as defined by ENV[“USERDOMAIN”] and ENV[“USERNAME”] if no arguments are supplied.
# File ext/dl/win32/lib/win32/sspi.rb, line 237
def initialize(user = nil, domain = nil)
if user.nil? && domain.nil? && ENV["USERNAME"].nil? && ENV["USERDOMAIN"].nil?
raise "A username or domain must be supplied since they cannot be retrieved from the environment"
end
@user = user || ENV["USERNAME"]
@domain = domain || ENV["USERDOMAIN"]
end