⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jwaauthif.pas

📁 比较全面的win32api开发包
💻 PAS
📖 第 1 页 / 共 2 页
字号:
{******************************************************************************}
{                                                       	               }
{ Internet Authentication Extensions API interface Unit for Object Pascal      }
{                                                       	               }
{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft          }
{ Corporation. All Rights Reserved.                                            }
{ 								               }
{ The original file is: authif.h, released June 2000. The original Pascal      }
{ code is: Authif.pas, released December 2000. The initial developer of the    }
{ Pascal code is Marcel van Brakel (brakelm@chello.nl).                        }
{                                                                              }
{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001            }
{ Marcel van Brakel. All Rights Reserved.                                      }
{ 								               }
{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI)        }
{								               }
{ You may retrieve the latest version of this file at the Project JEDI home    }
{ page, located at http://delphi-jedi.org or my personal homepage located at   }
{ http://members.chello.nl/m.vanbrakel2                                        }
{								               }
{ The contents of this file are used with permission, subject to the Mozilla   }
{ Public License Version 1.1 (the "License"); you may not use this file except }
{ in compliance with the License. You may obtain a copy of the License at      }
{ http://www.mozilla.org/MPL/MPL-1.1.html                                      }
{                                                                              }
{ Software distributed under the License is distributed on an "AS IS" basis,   }
{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
{ the specific language governing rights and limitations under the License.    }
{                                                                              }
{ Alternatively, the contents of this file may be used under the terms of the  }
{ GNU Lesser General Public License (the  "LGPL License"), in which case the   }
{ provisions of the LGPL License are applicable instead of those above.        }
{ If you wish to allow use of your version of this file only under the terms   }
{ of the LGPL License and not to allow others to use your version of this file }
{ under the MPL, indicate your decision by deleting  the provisions above and  }
{ replace  them with the notice and other provisions required by the LGPL      }
{ License.  If you do not delete the provisions above, a recipient may use     }
{ your version of this file under either the MPL or the LGPL License.          }
{ 								               }
{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
{ 								               }
{******************************************************************************}

unit JwaAuthif;

{$WEAKPACKAGEUNIT}

{$HPPEMIT ''}
{$HPPEMIT '#include "authif.h"'}
{$HPPEMIT ''}

{$I WINDEFINES.INC}

interface

uses
  JwaWinType;

//
//  Enumerates the attribute types that are passed to the extension DLL.  The
//  RADIUS standard attributes are included for convenience and should not be
//  considered exhaustive.
//

type
  _RADIUS_ATTRIBUTE_TYPE = DWORD;
  {$EXTERNALSYM _RADIUS_ATTRIBUTE_TYPE}
  RADIUS_ATTRIBUTE_TYPE = _RADIUS_ATTRIBUTE_TYPE;
  {$EXTERNALSYM RADIUS_ATTRIBUTE_TYPE}
  TRadiusAttributeType = RADIUS_ATTRIBUTE_TYPE;

const
  // Used to terminate attribute arrays.

  ratMinimum = 0;
  {$EXTERNALSYM ratMinimum}

  // RADIUS standard attributes.

  ratUserName = 1;
  {$EXTERNALSYM ratUserName}
  ratUserPassword = 2;
  {$EXTERNALSYM ratUserPassword}
  ratCHAPPassword = 3;
  {$EXTERNALSYM ratCHAPPassword}
  ratNASIPAddress = 4;
  {$EXTERNALSYM ratNASIPAddress}
  ratNASPort = 5;
  {$EXTERNALSYM ratNASPort}
  ratServiceType = 6;
  {$EXTERNALSYM ratServiceType}
  ratFramedProtocol = 7;
  {$EXTERNALSYM ratFramedProtocol}
  ratFramedIPAddress = 8;
  {$EXTERNALSYM ratFramedIPAddress}
  ratFramedIPNetmask = 9;
  {$EXTERNALSYM ratFramedIPNetmask}
  ratFramedRouting = 10;
  {$EXTERNALSYM ratFramedRouting}
  ratFilterId = 11;
  {$EXTERNALSYM ratFilterId}
  ratFramedMTU = 12;
  {$EXTERNALSYM ratFramedMTU}
  ratFramedCompression = 13;
  {$EXTERNALSYM ratFramedCompression}
  ratLoginIPHost = 14;
  {$EXTERNALSYM ratLoginIPHost}
  ratLoginService = 15;
  {$EXTERNALSYM ratLoginService}
  ratLoginPort = 16;
  {$EXTERNALSYM ratLoginPort}
  ratReplyMessage = 18;
  {$EXTERNALSYM ratReplyMessage}
  ratCallbackNumber = 19;
  {$EXTERNALSYM ratCallbackNumber}
  ratCallbackId = 20;
  {$EXTERNALSYM ratCallbackId}
  ratFramedRoute = 22;
  {$EXTERNALSYM ratFramedRoute}
  ratFramedIPXNetwork = 23;
  {$EXTERNALSYM ratFramedIPXNetwork}
  ratState = 24;
  {$EXTERNALSYM ratState}
  ratClass = 25;
  {$EXTERNALSYM ratClass}
  ratVendorSpecific = 26;
  {$EXTERNALSYM ratVendorSpecific}
  ratSessionTimeout = 27;
  {$EXTERNALSYM ratSessionTimeout}
  ratIdleTimeout = 28;
  {$EXTERNALSYM ratIdleTimeout}
  ratTerminationAction = 29;
  {$EXTERNALSYM ratTerminationAction}
  ratCalledStationId = 30;
  {$EXTERNALSYM ratCalledStationId}
  ratCallingStationId = 31;
  {$EXTERNALSYM ratCallingStationId}
  ratNASIdentifier = 32;
  {$EXTERNALSYM ratNASIdentifier}
  ratProxyState = 33;
  {$EXTERNALSYM ratProxyState}
  ratLoginLATService = 34;
  {$EXTERNALSYM ratLoginLATService}
  ratLoginLATNode = 35;
  {$EXTERNALSYM ratLoginLATNode}
  ratLoginLATGroup = 36;
  {$EXTERNALSYM ratLoginLATGroup}
  ratFramedAppleTalkLink = 37;
  {$EXTERNALSYM ratFramedAppleTalkLink}
  ratFramedAppleTalkNetwork = 38;
  {$EXTERNALSYM ratFramedAppleTalkNetwork}
  ratFramedAppleTalkZone = 39;
  {$EXTERNALSYM ratFramedAppleTalkZone}
  ratAcctStatusType = 40;
  {$EXTERNALSYM ratAcctStatusType}
  ratAcctDelayTime = 41;
  {$EXTERNALSYM ratAcctDelayTime}
  ratAcctInputOctets = 42;
  {$EXTERNALSYM ratAcctInputOctets}
  ratAcctOutputOctets = 43;
  {$EXTERNALSYM ratAcctOutputOctets}
  ratAcctSessionId = 44;
  {$EXTERNALSYM ratAcctSessionId}
  ratAcctAuthentic = 45;
  {$EXTERNALSYM ratAcctAuthentic}
  ratAcctSessionTime = 46;
  {$EXTERNALSYM ratAcctSessionTime}
  ratAcctInputPackets = 47;
  {$EXTERNALSYM ratAcctInputPackets}
  ratAcctOutputPackets = 48;
  {$EXTERNALSYM ratAcctOutputPackets}
  ratAcctTerminationCause = 49;
  {$EXTERNALSYM ratAcctTerminationCause}
  ratCHAPChallenge = 60;
  {$EXTERNALSYM ratCHAPChallenge}
  ratNASPortType = 61;
  {$EXTERNALSYM ratNASPortType}
  ratPortLimit = 62;
  {$EXTERNALSYM ratPortLimit}

  // Extended attribute types used to pass additional information.

  ratCode = 262;             // Request type code.
  {$EXTERNALSYM ratCode}
  ratIdentifier = 263;       // Request identifier.
  {$EXTERNALSYM ratIdentifier}
  ratAuthenticator = 264;    // Request authenticator.
  {$EXTERNALSYM ratAuthenticator}
  ratSrcIPAddress = 265;     // Source IP address.
  {$EXTERNALSYM ratSrcIPAddress}
  ratSrcPort = 266;          // Source IP port.
  {$EXTERNALSYM ratSrcPort}
  ratProvider = 267;         // Authentication provider.
  {$EXTERNALSYM ratProvider}
  ratStrippedUserName = 268; // User-Name with realm stripped.
  {$EXTERNALSYM ratStrippedUserName}
  ratFQUserName = 269;       // Fully-Qualified-User-Name.
  {$EXTERNALSYM ratFQUserName}
  ratPolicyName = 270;       // Remote Access Policy name.
  {$EXTERNALSYM ratPolicyName}
  ratUniqueId   = 271;       // Unique ID identifying the request.
  {$EXTERNALSYM ratUniqueId}
  ratExtensionState = 272;   // Used to pass state between extensions.
  {$EXTERNALSYM ratExtensionState}

//
//  Enumerates the different RADIUS packet codes. Used for the ratCode extended
//  attribute.
//

type
  _RADIUS_CODE = DWORD;
  {$EXTERNALSYM _RADIUS_CODE}
  RADIUS_CODE = _RADIUS_CODE;
  {$EXTERNALSYM RADIUS_CODE}
  TRadiusCode = RADIUS_CODE;

const
  rcUnknown = 0;
  {$EXTERNALSYM rcUnknown}
  rcAccessRequest = 1;
  {$EXTERNALSYM rcAccessRequest}
  rcAccessAccept = 2;
  {$EXTERNALSYM rcAccessAccept}
  rcAccessReject = 3;
  {$EXTERNALSYM rcAccessReject}
  rcAccountingRequest = 4;
  {$EXTERNALSYM rcAccountingRequest}
  rcAccountingResponse = 5;
  {$EXTERNALSYM rcAccountingResponse}
  rcAccessChallenge = 11;
  {$EXTERNALSYM rcAccessChallenge}
  rcDiscard = 256;
  {$EXTERNALSYM rcDiscard}

//
//  Enumerates the different authentication providers used for processing a
//  request. Used for the ratProvider extended attribute.
//

type
  _RADIUS_AUTHENTICATION_PROVIDER = (
    rapUnknown,
    rapUsersFile,
    rapProxy,
    rapWindowsNT,
    rapMCIS,
    rapODBC,
    rapNone);
  {$EXTERNALSYM _RADIUS_AUTHENTICATION_PROVIDER}
  RADIUS_AUTHENTICATION_PROVIDER = _RADIUS_AUTHENTICATION_PROVIDER;
  {$EXTERNALSYM RADIUS_AUTHENTICATION_PROVIDER}
  TRadiusAuthenticationProvider = RADIUS_AUTHENTICATION_PROVIDER;

//
//  Enumerates the different RADIUS data types. A type of 'rdtUnknown' means
//  the attribute was not recognized by the dictionary.
//

  _RADIUS_DATA_TYPE = (
   rdtUnknown,
   rdtString,
   rdtAddress,
   rdtInteger,
   rdtTime);
  {$EXTERNALSYM _RADIUS_DATA_TYPE}
  RADIUS_DATA_TYPE = _RADIUS_DATA_TYPE;
  {$EXTERNALSYM RADIUS_DATA_TYPE}
  TRadiusDataType = RADIUS_DATA_TYPE;

//
//  Struct representing a RADIUS or extended attribute.
//

  _RADIUS_ATTRIBUTE  = record
    dwAttrType: DWORD;            // Attribute type
    fDataType: RADIUS_DATA_TYPE;  // RADIUS_DATA_TYPE of the value
    cbDataLength: DWORD;          // Length of the value (in bytes)
    case Integer of
      0: (dwValue: DWORD);        // For rdtAddress, rdtInteger, and rdtTime
      1: (lpValue: PCSTR);        // For rdtUnknown, and rdtString
  end;
  {$EXTERNALSYM _RADIUS_ATTRIBUTE}
  RADIUS_ATTRIBUTE = _RADIUS_ATTRIBUTE;
  {$EXTERNALSYM RADIUS_ATTRIBUTE}
  PRADIUS_ATTRIBUTE = ^RADIUS_ATTRIBUTE;
  {$EXTERNALSYM PRADIUS_ATTRIBUTE}
  TRadiusAttribute = RADIUS_ATTRIBUTE;
  PRadiusAttribute = PRADIUS_ATTRIBUTE;

//
//  Struct representing the layout of a RADIUS Vendor-Specific attribute. This
//  is useful when interpreting the RADIUS_ATTRIBUTE lpValue field when
//  dwAttrType is ratVendorSpecific.
//

  _RADIUS_VSA_FORMAT = record
   VendorId: array [0..3] of BYTE;
   VendorType: BYTE;
   VendorLength: BYTE;
   AttributeSpecific: array [0..0] of BYTE;
  end;
  {$EXTERNALSYM _RADIUS_VSA_FORMAT}
  RADIUS_VSA_FORMAT = _RADIUS_VSA_FORMAT;
  {$EXTERNALSYM RADIUS_VSA_FORMAT}
  TRadiusVsaFormat = RADIUS_VSA_FORMAT;

//
//  Enumerates the different actions an extension DLL can generate in
//  response to an Access-Request.
//

  _RADIUS_ACTION = (
   raContinue,
   raReject,
   raAccept);
  {$EXTERNALSYM _RADIUS_ACTION}
  RADIUS_ACTION = _RADIUS_ACTION;
  {$EXTERNALSYM RADIUS_ACTION}
  PRADIUS_ACTION = ^RADIUS_ACTION;
  {$EXTERNALSYM PRADIUS_ACTION}
  TRadiusAction = RADIUS_ACTION;
  PRadiusAction = PRADIUS_ACTION;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -