Class: Win32::SSPI::Identity

Inherits:
Object
  • Object
show all
Defined in:
lib/win32/sspi.rb

Overview

SEC_WINNT_AUTH_IDENTITY structure

Constant Summary collapse

SEC_WINNT_AUTH_IDENTITY_ANSI =
0x1

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user = nil, domain = nil, password = nil) ⇒ Identity

Returns a new instance of Identity.



139
140
141
142
143
144
# File 'lib/win32/sspi.rb', line 139

def initialize(user = nil, domain = nil, password = nil)
	@user = user
	@domain = domain
	@password = password
	@flags = SEC_WINNT_AUTH_IDENTITY_ANSI
end

Instance Attribute Details

#domainObject

Returns the value of attribute domain



137
138
139
# File 'lib/win32/sspi.rb', line 137

def domain
  @domain
end

#passwordObject

Returns the value of attribute password



137
138
139
# File 'lib/win32/sspi.rb', line 137

def password
  @password
end

#userObject

Returns the value of attribute user



137
138
139
# File 'lib/win32/sspi.rb', line 137

def user
  @user
end

Instance Method Details

#to_pObject



146
147
148
149
150
151
# File 'lib/win32/sspi.rb', line 146

def to_p
	[@user, @user ? @user.length : 0,
	 @domain, @domain ? @domain.length : 0,
	 @password, @password ? @password.length : 0,
	 @flags].pack("PLPLPLL")
end