home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-perl-addon-1.4.9-installer.exe / SASL.pod < prev    next >
Encoding:
Text File  |  2004-04-10  |  4.0 KB  |  168 lines

  1.  
  2. =head1 NAME
  3.  
  4. Authen::SASL - SASL Authentication framework
  5.  
  6. =head1 SYNOPSIS
  7.  
  8.  use Authen::SASL;
  9.  
  10.  $sasl = Authen::SASL->new(
  11.    mechanism => 'CRAM-MD5 PLAIN ANONYMOUS',
  12.    callback => {
  13.      pass => \&fetch_password,
  14.      user => $user,
  15.    }
  16.  );
  17.  
  18. =head1 DESCRIPTION
  19.  
  20. SASL is a generic mechanism for authentication used by several
  21. network protocols. B<Authen::SASL> provides an implementation
  22. framework that all protocols should be able to share.
  23.  
  24. The framework allows different implementations of the connection
  25. class to be plugged in. At the time of writing there were two such
  26. plugins.
  27.  
  28. =over 4
  29.  
  30. =item Authen::SASL::Perl
  31.  
  32. This module implements several mechanisms and is implemented
  33. entirely in Perl.
  34.  
  35. =item Authen::SASL::Cyrus
  36.  
  37. This module uses the Cyrus SASL C-library (both version 1 and 2 
  38. are supported).
  39.  
  40. =back
  41.  
  42. =head2 CONTRUCTOR
  43.  
  44. The contructor may be called with or without arguments. Passing arguments is
  45. just a short cut to calling the C<mechanism> and C<callback> methods.
  46.  
  47. =head2 METHODS
  48.  
  49. =over 4
  50.  
  51. =item mechanism
  52.  
  53. Returns the current list of mechanisms
  54.  
  55. =item mechanism NAMES
  56.  
  57. Set the list of mechanisms to choose from. NAMES should be a space separated string
  58. of the names.
  59.  
  60. =item callback NAME
  61.  
  62. Returns the current callback associated with NAME
  63.  
  64. =item callback NAME => VALUE, NAME => VALUE, ...
  65.  
  66. Sets the given callbacks to the given values
  67.  
  68. =item client_new SERVICE, HOST, SECURITY
  69.  
  70. Creates and returns a new connection object for a client-side connection.
  71.  
  72. =item server_new SERVICE, HOST
  73.  
  74. Creates and returns a new connection object for a server-side connection.
  75. Currently only supported by L<Authen::SASL::Cyrus>.
  76.  
  77. =back
  78.  
  79. =head1 The Connection Class
  80.  
  81. =over 4
  82.  
  83. =item server_start ( CHALLENGE )
  84.  
  85. server_start begins the authentication using the chosen mechanism.
  86. If the mechanism is not supported by the installed SASL it fails.
  87. Because for some mechanisms the client has to start the negotiation,
  88. you can give the client challenge as a parameter.
  89.  
  90. =item server_step ( CHALLENGE )
  91.  
  92. server_step performs the next step in the negotiation process. The
  93. first parameter you give is the clients challenge/response.
  94.  
  95. =item client_start
  96.  
  97. The initial step to be performed. Returns the initial value to pass to the server
  98. or an empty list on error.
  99.  
  100. =item client_step CHALLENGE
  101.  
  102. This method is called when a response from the server requires it. CHALLENGE
  103. is the value from the server. Returns the next value to pass to the server or an
  104. empty list on error.
  105.  
  106. =item property NAME
  107.  
  108. =item property NAME => VALUE, NAME => VALUE
  109.  
  110. =item service
  111.  
  112. Returns the service argument that was passed to *_new-methods.
  113.  
  114. =item host
  115.  
  116. Returns the host argument that was passed to *_new-methods.
  117.  
  118. =item mechanism
  119.  
  120. Returns the name of the chosen mechanism.
  121.  
  122. =back
  123.  
  124. =head2 Callbacks
  125.  
  126. There are three different ways in which a callback may be passed
  127.  
  128. =over
  129.  
  130. =item CODEREF
  131.  
  132. If the value passed is a code reference then, when needed, it will be called
  133. and the connection object will be passed as the first argument.
  134.  
  135. =item ARRAYREF
  136.  
  137. If the value passed is an array reference, the first element in the array
  138. must be a code reference. When the callback is called the code reference
  139. will be called with the connection object passed as the first argument
  140. and all other values from the array passed after.
  141.  
  142. =item SCALAR
  143.  
  144. All other values passed will be used directly. ie it is the same as
  145. passing an code reference that, when called, returns the value.
  146.  
  147. =back
  148.  
  149. =head1 SEE ALSO
  150.  
  151. L<Authen::SASL::Perl>, L<Authen::SASL::Cyrus> (for more methods that currently
  152. only support by Authen::SASL::Cyrus)
  153.  
  154. =head1 AUTHOR
  155.  
  156. Graham Barr <gbarr@pobox.com>
  157.  
  158. Please report any bugs, or post any suggestions, to the perl-ldap mailing list
  159. <perl-ldap-dev@lists.sourceforge.net>
  160.  
  161. =head1 COPYRIGHT
  162.  
  163. Copyright (c) 1998-2004 Graham Barr. All rights reserved. This program is
  164. free software; you can redistribute it and/or modify it under the same
  165. terms as Perl itself.
  166.  
  167. =cut
  168.