.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14 .\" .\" Standard preamble: .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .\" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Authen::SASL 3" .TH Authen::SASL 3 "2008-04-21" "perl v5.8.4" "User Contributed Perl Documentation" .SH "NAME" Authen::SASL \- SASL Authentication framework .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Authen::SASL; .Ve .PP .Vb 7 \& $sasl = Authen::SASL->new( \& mechanism => 'CRAM-MD5 PLAIN ANONYMOUS', \& callback => { \& pass => \e&fetch_password, \& user => $user, \& } \& ); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\s-1SASL\s0 is a generic mechanism for authentication used by several network protocols. \fBAuthen::SASL\fR provides an implementation framework that all protocols should be able to share. .PP The framework allows different implementations of the connection class to be plugged in. At the time of writing there were two such plugins. .IP "Authen::SASL::Perl" 4 .IX Item "Authen::SASL::Perl" This module implements several mechanisms and is implemented entirely in Perl. .IP "Authen::SASL::Cyrus" 4 .IX Item "Authen::SASL::Cyrus" This module uses the Cyrus \s-1SASL\s0 C\-library (both version 1 and 2 are supported). .PP By default the order in which these plugins are selected is Authen::SASL::Cyrus first and then Authen::SASL::Perl. .PP If you want to change it or want to specifically use one implementation only simply do .PP .Vb 1 \& use Authen::SASL qw(Perl); .Ve .PP or if you have another plugin module that supports the Authen::SASL \s-1API\s0 .PP .Vb 1 \& use Authen::SASL qw(My::SASL::Plugin); .Ve .Sh "\s-1CONTRUCTOR\s0" .IX Subsection "CONTRUCTOR" .IP "new ( \s-1OPTIONS\s0 )" 4 .IX Item "new ( OPTIONS )" The contructor may be called with or without arguments. Passing arguments is just a short cut to calling the \f(CW\*(C`mechanism\*(C'\fR and \f(CW\*(C`callback\*(C'\fR methods. .RS 4 .IP "callback => { \s-1NAME\s0 => \s-1VALUE\s0, \s-1NAME\s0 => \s-1VALUE\s0, ... }" 4 .IX Item "callback => { NAME => VALUE, NAME => VALUE, ... }" Set the callbacks. See the callback method for details. .IP "mechanism => \s-1NAMES\s0" 4 .IX Item "mechanism => NAMES" .PD 0 .IP "mech => \s-1NAMES\s0" 4 .IX Item "mech => NAMES" .PD Set the list of mechanisms to choose from. See the mechanism method for details. .IP "debug => \s-1VALUE\s0" 4 .IX Item "debug => VALUE" Set the debug level bit-value to \f(CW\*(C`VALUE\*(C'\fR .Sp Debug output will be sent to \f(CW\*(C`STDERR\*(C'\fR. The bits of this value are: .Sp .Vb 4 \& 1 Show debug messages in the Perl modules for the mechanisms. \& (Currently only used in GSSAPI) \& 4 With security layers in place show information on packages read. \& 8 With security layers in place show information on packages written. .Ve .Sp The default value is 0. .RE .RS 4 .RE .Sh "\s-1METHODS\s0" .IX Subsection "METHODS" .IP "mechanism ( )" 4 .IX Item "mechanism ( )" Returns the current list of mechanisms .IP "mechanism ( \s-1NAMES\s0 )" 4 .IX Item "mechanism ( NAMES )" Set the list of mechanisms to choose from. \f(CW\*(C`NAMES\*(C'\fR should be a space separated string of the names. .IP "callback ( \s-1NAME\s0 )" 4 .IX Item "callback ( NAME )" Returns the current callback associated with \f(CW\*(C`NAME\*(C'\fR. .IP "callback ( \s-1NAME\s0 => \s-1VALUE\s0, \s-1NAME\s0 => \s-1VALUE\s0, ... )" 4 .IX Item "callback ( NAME => VALUE, NAME => VALUE, ... )" Sets the given callbacks to the given values .IP "client_new ( \s-1SERVICE\s0, \s-1HOST\s0, \s-1SECURITY\s0 )" 4 .IX Item "client_new ( SERVICE, HOST, SECURITY )" Creates and returns a new connection object for a client-side connection. .IP "server_new ( \s-1SERVICE\s0, \s-1HOST\s0 )" 4 .IX Item "server_new ( SERVICE, HOST )" Creates and returns a new connection object for a server-side connection. Currently only supported by Authen::SASL::Cyrus. .IP "error ( )" 4 .IX Item "error ( )" Returns any error from the last connection .SH "The Connection Class" .IX Header "The Connection Class" .IP "server_start ( \s-1CHALLENGE\s0 )" 4 .IX Item "server_start ( CHALLENGE )" server_start begins the authentication using the chosen mechanism. If the mechanism is not supported by the installed \s-1SASL\s0 it fails. Because for some mechanisms the client has to start the negotiation, you can give the client challenge as a parameter. .IP "server_step ( \s-1CHALLENGE\s0 )" 4 .IX Item "server_step ( CHALLENGE )" server_step performs the next step in the negotiation process. The first parameter you give is the clients challenge/response. .IP "client_start ( )" 4 .IX Item "client_start ( )" The initial step to be performed. Returns the initial value to pass to the server or an empty list on error. .IP "client_step ( \s-1CHALLENGE\s0 )" 4 .IX Item "client_step ( CHALLENGE )" This method is called when a response from the server requires it. \s-1CHALLENGE\s0 is the value from the server. Returns the next value to pass to the server or an empty list on error. .IP "answer ( \s-1NAME\s0 )" 4 .IX Item "answer ( NAME )" The method will return the value returned from the last call to the callback \s-1NAME\s0 .IP "property ( \s-1NAME\s0 )" 4 .IX Item "property ( NAME )" Returns the property value associated with \f(CW\*(C`NAME\*(C'\fR. .IP "property ( \s-1NAME\s0 => \s-1VALUE\s0, \s-1NAME\s0 => \s-1VALUE\s0, ... )" 4 .IX Item "property ( NAME => VALUE, NAME => VALUE, ... )" Sets the named properties to their associated values. .IP "service ( )" 4 .IX Item "service ( )" Returns the service argument that was passed to *_new\-methods. .IP "host ( )" 4 .IX Item "host ( )" Returns the host argument that was passed to *_new\-methods. .IP "mechanism ( )" 4 .IX Item "mechanism ( )" Returns the name of the chosen mechanism. .Sh "Callbacks" .IX Subsection "Callbacks" There are three different ways in which a callback may be passed .IP "\s-1CODEREF\s0" 4 .IX Item "CODEREF" If the value passed is a code reference then, when needed, it will be called and the connection object will be passed as the first argument. In addition some callbacks may be passed additional arguments. .IP "\s-1ARRAYREF\s0" 4 .IX Item "ARRAYREF" If the value passed is an array reference, the first element in the array must be a code reference. When the callback is called the code reference will be called with the connection object passed as the first argument and all other values from the array passed after. .IP "\s-1SCALAR\s0" 4 .IX Item "SCALAR" All other values passed will be used directly. ie it is the same as passing an code reference that, when called, returns the value. .SH "SEE ALSO" .IX Header "SEE ALSO" Authen::SASL::Perl, Authen::SASL::Cyrus (for more methods that currently only support by Authen::SASL::Cyrus) .SH "AUTHOR" .IX Header "AUTHOR" Graham Barr .PP Please report any bugs, or post any suggestions, to the perl-ldap mailing list .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 1998\-2005 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.