ActiveDirectory Class

Properties   Methods   Events   Configuration Settings   Errors  

The ActiveDirectory class can be used to authenticate users against Active Directory using Kerberos 5.0.

Class Name

IPWorksAuth_ActiveDirectory

Procedural Interface

 ipworksauth_activedirectory_open();
 ipworksauth_activedirectory_close($res);
 ipworksauth_activedirectory_register_callback($res, $id, $function);
 ipworksauth_activedirectory_get_last_error($res);
 ipworksauth_activedirectory_get_last_error_code($res);
 ipworksauth_activedirectory_set($res, $id, $index, $value);
 ipworksauth_activedirectory_get($res, $id, $index);
 ipworksauth_activedirectory_do_authenticate($res);
 ipworksauth_activedirectory_do_changepassword($res, $user, $oldpassword, $newpassword);
 ipworksauth_activedirectory_do_config($res, $configurationstring);
 ipworksauth_activedirectory_do_doevents($res);
 ipworksauth_activedirectory_do_interrupt($res);
 ipworksauth_activedirectory_do_listcomputers($res);
 ipworksauth_activedirectory_do_listgroupmembers($res, $group);
 ipworksauth_activedirectory_do_listgroups($res);
 ipworksauth_activedirectory_do_listusergroups($res, $user);
 ipworksauth_activedirectory_do_reset($res);

Remarks

The ActiveDirectory class authenticates users against Active Directory. Authentication is performed using the Kerberos protocol defined in RFC 1510 and RFC 4120.

Authentication

When Authenticate is called the class will attempt to authenticate the user with the Active Directory server. The class will communicate with the ADHost to obtain a service ticket and populate AuthToken. The following properties are required when calling this method:

A typical sequence of messages would be:

  • KRB_AS_REQ -> KDC
  • KRB_AS_REP <- KDC
  • KRB_TGS_REQ -> KDC
  • KRB_TGS_REP <- KDC
  • AuthToken is populated with the constructed KRB_AP_REP message.

Communication with the ADHost can be seen through the PITrail event.

Property List


The following is the full list of the properties of the class with short descriptions. Click on the links for further details.

ADHostThe domain name or IP address of the Active Directory server.
ADPortThe port for the Active Directory server.
AuthMechanismThe authentication mechanism to be used when connecting to the Active Directory server.
AuthTokenThe authentication token.
PasswordThe user's password.
SPNThe Service Principal Name (SPN).
TimeoutA timeout for the class.
UserThe name and domain of the user to authenticate.

Method List


The following is the full list of the methods of the class with short descriptions. Click on the links for further details.

AuthenticateAuthenticates the user.
ChangePasswordChanges the password for the specified user.
ConfigSets or retrieves a configuration setting.
DoEventsProcesses events from the internal message queue.
InterruptInterrupt the current method.
ListComputersLists all computers in the directory.
ListGroupMembersList all members of a group.
ListGroupsList all groups in the directory.
ListUserGroupsLists all groups a user is a part of.
ResetResets the class properties to their default values.

Event List


The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.

ComputerListFired for each computer entry returned.
ErrorInformation about errors during data delivery.
GroupListFired for each group entry returned.
LogFires once for each log message.
PITrailTraces the messages sent to the server, and the respective replies.
UserListFired once for each user entry returned.

Configuration Settings


The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.

CredentialsCacheFileThe credentials cache file.
EncodeAuthTokenWhether to Base64 encode the AuthToken.
EncryptionTypesThe encryption types used during authentication.
KeytabFileThe Kerberos Keytab file.
LogKerberosPacketsWhether to include the raw Kerberos packets in PITrail output.
LogLevelThe level of detail that is logged.
UsePlatformKerberosAPIWhether to use the platform Kerberos API.
ConnectionTimeoutSets a separate timeout value for establishing a connection.
FirewallAutoDetectTells the class whether or not to automatically detect and use firewall system settings, if available.
FirewallHostName or IP address of firewall (optional).
FirewallPasswordPassword to be used if authentication is to be used when connecting through the firewall.
FirewallPortThe TCP port for the FirewallHost;.
FirewallTypeDetermines the type of firewall to connect through.
FirewallUserA user name if authentication is to be used connecting through a firewall.
KeepAliveIntervalThe retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received.
KeepAliveTimeThe inactivity time in milliseconds before a TCP keep-alive packet is sent.
LingerWhen set to True, connections are terminated gracefully.
LingerTimeTime in seconds to have the connection linger.
LocalHostThe name of the local host through which connections are initiated or accepted.
LocalPortThe port in the local host where the class binds.
MaxLineLengthThe maximum amount of data to accumulate when no EOL is found.
MaxTransferRateThe transfer rate limit in bytes per second.
ProxyExceptionsListA semicolon separated list of hosts and IPs to bypass when using a proxy.
TCPKeepAliveDetermines whether or not the keep alive socket option is enabled.
TcpNoDelayWhether or not to delay when sending packets.
UseIPv6Whether to use IPv6.
AbsoluteTimeoutDetermines whether timeouts are inactivity timeouts or absolute timeouts.
FirewallDataUsed to send extra data to the firewall.
InBufferSizeThe size in bytes of the incoming queue of the socket.
OutBufferSizeThe size in bytes of the outgoing queue of the socket.
BuildInfoInformation about the product's build.
CodePageThe system code page used for Unicode to Multibyte translations.
LicenseInfoInformation about the current license.
ProcessIdleEventsWhether the class uses its internal event loop to process events when the main thread is idle.
SelectWaitMillisThe length of time in milliseconds the class will wait when DoEvents is called if there are no events to process.
UseInternalSecurityAPITells the class whether or not to use the system security libraries or an internal implementation.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Auth 2020 PHP Edition - Version 20.0 [Build 8155]