code:
<?php
/**
 * Part of XML_XRD
 *
 * PHP version 5
 *
 * @category XML
 * @package  XML_XRD
 * @author   Christian Weiske <cweiske@php.net>
 * @license  http://www.gnu.org/copyleft/lesser.html LGPL
 * @link     http://pear.php.net/package/XML_XRD
 */

/**
 * Loads XRD data from an XML file
 *
 * @category XML
 * @package  XML_XRD
 * @author   Christian Weiske <cweiske@php.net>
 * @license  http://www.gnu.org/copyleft/lesser.html LGPL
 * @version  Release: @package_version@
 * @link     http://pear.php.net/package/XML_XRD
 */
class XML_XRD_Loader_XML
{
    /**
     * Data storage the XML data get loaded into
     *
     * @var XML_XRD
     */
    protected $xrd;

    /**
     * XRD 1.0 namespace
     */
    const NS_XRD = 'http://docs.oasis-open.org/ns/xri/xrd-1.0';

    /**
     * Init object with xrd object
     *
     * @param XML_XRD $xrd Data storage the XML data get loaded into
     */
    public function __construct(XML_XRD $xrd)
    {
        $this->xrd = $xrd;
    }

    /**
     * Loads the contents of the given file
     *
     * @param string $file Path to an XRD file
     *
     * @return void
     *
     * @throws XML_XRD_Loader_Exception When the XML is invalid or cannot be
     *                                   loaded
     */
    public function loadFile($file)
    {
        $old = libxml_use_internal_errors(true);
        $x = simplexml_load_file($file);
        libxml_use_internal_errors($old);
        if ($x === false) {
            throw new XML_XRD_Loader_Exception(
                'Error loading XML file: ' . libxml_get_last_error()->message,
                XML_XRD_Loader_Exception::LOAD
            );
        }
        return $this->load($x);
    }

    /**
     * Loads the contents of the given string
     *
     * @param string $xml XML string
     *
     * @return void
     *
     * @throws XML_XRD_Loader_Exception When the XML is invalid or cannot be
     *                                   loaded
     */
    public function loadString($xml)
    {
        if ($xml == '') {
            throw new XML_XRD_Loader_Exception(
                'Error loading XML string: string empty',
                XML_XRD_Loader_Exception::LOAD
            );
        }
        $old = libxml_use_internal_errors(true);
        $x = simplexml_load_string($xml);
        libxml_use_internal_errors($old);
        if ($x === false) {
            throw new XML_XRD_Loader_Exception(
                'Error loading XML string: ' . libxml_get_last_error()->message,
                XML_XRD_Loader_Exception::LOAD
            );
        }
        return $this->load($x);
    }

    /**
     * Loads the XML element into the classes' data structures
     *
     * @param object $x XML element containing the whole XRD document
     *
     * @return void
     *
     * @throws XML_XRD_Loader_Exception When the XML is invalid
     */
    public function load(SimpleXMLElement $x)
    {
        $ns = $x->getDocNamespaces();
        if ($ns[''] !== self::NS_XRD) {
            throw new XML_XRD_Loader_Exception(
                'Wrong document namespace', XML_XRD_Loader_Exception::DOC_NS
            );
        }
        if ($x->getName() != 'XRD') {
            throw new XML_XRD_Loader_Exception(
                'XML root element is not "XRD"', XML_XRD_Loader_Exception::DOC_ROOT
            );
        }

        if (isset($x->Subject)) {
            $this->xrd->subject = (string)$x->Subject;
        }
        foreach ($x->Alias as $xAlias) {
            $this->xrd->aliases[] = (string)$xAlias;
        }

        foreach ($x->Link as $xLink) {
            $this->xrd->links[] = $this->loadLink($xLink);
        }

        $this->loadProperties($this->xrd, $x);

        if (isset($x->Expires)) {
            $this->xrd->expires = strtotime($x->Expires);
        }

        $xmlAttrs = $x->attributes('http://www.w3.org/XML/1998/namespace');
        if (isset($xmlAttrs['id'])) {
            $this->xrd->id = (string)$xmlAttrs['id'];
        }
    }

    /**
     * Loads the Property elements from XML
     *
     * @param object $store Data store where the properties get stored
     * @param object $x     XML element
     *
     * @return boolean True when all went well
     */
    protected function loadProperties(
        XML_XRD_PropertyAccess $store, SimpleXMLElement $x
    ) {
        foreach ($x->Property as $xProp) {
            $store->properties[] = $this->loadProperty($xProp);
        }
    }

    /**
     * Create a link element object from XML element
     *
     * @param object $x XML link element
     *
     * @return XML_XRD_Element_Link Created link object
     */
    protected function loadLink(SimpleXMLElement $x)
    {
        $link = new XML_XRD_Element_Link();
        foreach (array('rel', 'type', 'href', 'template') as $var) {
            if (isset($x[$var])) {
                $link->$var = (string)$x[$var];
            }
        }

        foreach ($x->Title as $xTitle) {
            $xmlAttrs = $xTitle->attributes('http://www.w3.org/XML/1998/namespace');
            $lang = '';
            if (isset($xmlAttrs['lang'])) {
                $lang = (string)$xmlAttrs['lang'];
            }
            if (!isset($link->titles[$lang])) {
                $link->titles[$lang] = (string)$xTitle;
            }
        }
        $this->loadProperties($link, $x);

        return $link;
    }

    /**
     * Create a property element object from XML element
     *
     * @param object $x XML property element
     *
     * @return XML_XRD_Element_Property Created link object
     */
    protected function loadProperty(SimpleXMLElement $x)
    {
        $prop = new XML_XRD_Element_Property();
        if (isset($x['type'])) {
            $prop->type = (string)$x['type'];
        }
        $s = (string)$x;
        if ($s != '') {
            $prop->value = $s;
        }

        return $prop;
    }
}
?>


code:
<?php
/**
 * Part of XML_XRD
 *
 * PHP version 5
 *
 * @category XML
 * @package  XML_XRD
 * @author   Christian Weiske <cweiske@php.net>
 * @license  http://www.gnu.org/copyleft/lesser.html LGPL
 * @link     http://pear.php.net/package/XML_XRD
 */

require_once 'XML/XRD/Exception.php';

/**
 * XML_XRD exception that's thrown when something is not supported
 *
 * @category XML
 * @package  XML_XRD
 * @author   Christian Weiske <cweiske@php.net>
 * @license  http://www.gnu.org/copyleft/lesser.html LGPL
 * @version  Release: @package_version@
 * @link     http://pear.php.net/package/XML_XRD
 */
class XML_XRD_LogicException extends LogicException implements XML_XRD_Exception
{
}

?>

license: mit


code:
<?php
/**
 * Part of XML_XRD
 *
 * PHP version 5
 *
 * @category XML
 * @package  XML_XRD
 * @author   Christian Weiske <cweiske@php.net>
 * @license  http://www.gnu.org/copyleft/lesser.html LGPL
 * @link     http://pear.php.net/package/XML_XRD
 */

require_once 'XML/XRD/LogicException.php';
require_once 'XML/XRD/Element/Property.php';

/**
 * Provides ArrayAccess to extending classes (XML_XRD and XML_XRD_Element_Link).
 *
 * By extending PropertyAccess, access to properties is possible with
 * "$object['propertyType']" array access notation.
 *
 * @category XML
 * @package  XML_XRD
 * @author   Christian Weiske <cweiske@php.net>
 * @license  http://www.gnu.org/copyleft/lesser.html LGPL
 * @version  Release: @package_version@
 * @link     http://pear.php.net/package/XML_XRD
 */
abstract class XML_XRD_PropertyAccess implements ArrayAccess
{

    /**
     * Array of property objects
     *
     * @var array
     */
    public $properties = array();

    /**
     * Check if the property with the given type exists
     *
     * Part of the ArrayAccess interface
     *
     * @param string $type Property type to check for
     *
     * @return boolean True if it exists
     */
    public function offsetExists($type)
    {
        foreach ($this->properties as $prop) {
            if ($prop->type == $type) {
                return true;
            }
        }
        return false;
    }

    /**
     * Return the highest ranked property with the given type
     *
     * Part of the ArrayAccess interface
     *
     * @param string $type Property type to check for
     *
     * @return string Property value or NULL if empty
     */
    public function offsetGet($type)
    {
        foreach ($this->properties as $prop) {
            if ($prop->type == $type) {
                return $prop->value;
            }
        }
        return null;
    }

    /**
     * Not implemented.
     *
     * Part of the ArrayAccess interface
     *
     * @param string $type  Property type to check for
     * @param string $value New property value
     *
     * @return void
     *
     * @throws XML_XRD_LogicException Always
     */
    public function offsetSet($type, $value)
    {
        throw new XML_XRD_LogicException('Changing properties not implemented');
    }

    /**
     * Not implemented.
     *
     * Part of the ArrayAccess interface
     *
     * @param string $type Property type to check for
     *
     * @return void
     *
     * @throws XML_XRD_LogicException Always
     */
    public function offsetUnset($type)
    {
        throw new XML_XRD_LogicException('Changing properties not implemented');
    }

    /**
     * Get all properties with the given type
     *
     * @param string $type Property type to filter by
     *
     * @return array Array of XML_XRD_Element_Property objects
     */
    public function getProperties($type = null)
    {
        if ($type === null) {
            return $this->properties;
        }
        $properties = array();
        foreach ($this->properties as $prop) {
            if ($prop->type == $type) {
                $properties[] = $prop;
            }
        }
        return $properties;
    }
}
?>


code:
<?php
/**
 * Part of XML_XRD
 *
 * PHP version 5
 *
 * @category XML
 * @package  XML_XRD
 * @author   Christian Weiske <cweiske@php.net>
 * @license  http://www.gnu.org/copyleft/lesser.html LGPL
 * @link     http://pear.php.net/package/XML_XRD
 */

require_once 'XML/XRD/Serializer/Exception.php';

/**
 * Serialization dispatcher - loads the correct serializer for saving XRD data.
 *
 * @category XML
 * @package  XML_XRD
 * @author   Christian Weiske <cweiske@php.net>
 * @license  http://www.gnu.org/copyleft/lesser.html LGPL
 * @version  Release: @package_version@
 * @link     http://pear.php.net/package/XML_XRD
 */
class XML_XRD_Serializer
{
    /**
     * XRD data storage
     *
     * @var XML_XRD
     */
    protected $xrd;

    /**
     * Init object with xrd object
     *
     * @param XML_XRD $xrd Data storage the data are fetched from
     */
    public function __construct(XML_XRD $xrd)
    {
        $this->xrd = $xrd;
    }

    /**
     * Convert the XRD data into a string of the given type
     *
     * @param string $type File type: xml or json
     *
     * @return string Serialized data
     */
    public function to($type)
    {
        return (string)$this->getSerializer($type);
    }

    /**
     * Creates a XRD loader object for the given type
     *
     * @param string $type File type: xml or json
     *
     * @return XML_XRD_Loader
     */
    protected function getSerializer($type)
    {
        $class = 'XML_XRD_Serializer_' . strtoupper($type);
        $file = str_replace('_', '/', $class) . '.php';
        include_once $file;
        if (class_exists($class)) {
            return new $class($this->xrd);
        }

        throw new XML_XRD_Serializer_Exception(
            'No serializer for type "' . $type . '"',
            XML_XRD_Loader_Exception::NO_LOADER
        );
    }
}
?>


code:
<?php
/**
 * Part of XML_XRD
 *
 * PHP version 5
 *
 * @category XML
 * @package  XML_XRD
 * @author   Christian Weiske <cweiske@php.net>
 * @license  http://www.gnu.org/copyleft/lesser.html LGPL
 * @link     http://pear.php.net/package/XML_XRD
 */

require_once 'XML/XRD/Exception.php';

/**
 * XML_XRD exception that's thrown when saving an XRD file fails.
 *
 * @category XML
 * @package  XML_XRD
 * @author   Christian Weiske <cweiske@php.net>
 * @license  http://www.gnu.org/copyleft/lesser.html LGPL
 * @version  Release: @package_version@
 * @link     http://pear.php.net/package/XML_XRD
 */
class XML_XRD_Serializer_Exception extends Exception implements XML_XRD_Exception
{
}
?>


code:
<?php
/**
 * Part of XML_XRD
 *
 * PHP version 5
 *
 * @category XML
 * @package  XML_XRD
 * @author   Christian Weiske <cweiske@php.net>
 * @license  http://www.gnu.org/copyleft/lesser.html LGPL
 * @link     http://pear.php.net/package/XML_XRD
 */

/**
 * Generate JSON from a XML_XRD object (for JRD files).
 *
 * @category XML
 * @package  XML_XRD
 * @author   Christian Weiske <cweiske@php.net>
 * @license  http://www.gnu.org/copyleft/lesser.html LGPL
 * @version  Release: @package_version@
 * @link     http://pear.php.net/package/XML_XRD
 * @link     http://tools.ietf.org/html/rfc6415#appendix-A
 */
class XML_XRD_Serializer_JSON
{
    protected $xrd;

    /**
     * Create new instance
     *
     * @param XML_XRD $xrd XRD instance to convert to JSON
     */
    public function __construct(XML_XRD $xrd)
    {
        $this->xrd = $xrd;
    }

    /**
     * Generate JSON.
     *
     * @return string JSON code
     */
    public function __toString()
    {
        $o = new stdClass();
        if ($this->xrd->expires !== null) {
            $o->expires = gmdate('Y-m-d\TH:i:s\Z', $this->xrd->expires);
        }
        if ($this->xrd->subject !== null) {
            $o->subject = $this->xrd->subject;
        }
        foreach ($this->xrd->aliases as $alias) {
            $o->aliases[] = $alias;
        }
        foreach ($this->xrd->properties as $property) {
            $o->properties[$property->type] = $property->value;
        }
        $o->links = array();
        foreach ($this->xrd->links as $link) {
            $lid = count($o->links);
            $o->links[$lid] = new stdClass();
            if ($link->rel) {
                $o->links[$lid]->rel = $link->rel;
            }
            if ($link->type) {
                $o->links[$lid]->type = $link->type;
            }
            if ($link->href) {
                $o->links[$lid]->href = $link->href;
            }
            if ($link->template !== null && $link->href === null) {
                $o->links[$lid]->template = $link->template;
            }

            foreach ($link->titles as $lang => $value) {
                if ($lang == null) {
                    $lang = 'default';
                }
                $o->links[$lid]->titles[$lang] = $value;
            }
            foreach ($link->properties as $property) {
                $o->links[$lid]->properties[$property->type] = $property->value;
            }
        }
        if (count($o->links) == 0) {
            unset($o->links);
        }

        return json_encode($o);
    }
}

?>


code:
<?php
/**
 * Part of XML_XRD
 *
 * PHP version 5
 *
 * @category XML
 * @package  XML_XRD
 * @author   Christian Weiske <cweiske@php.net>
 * @license  http://www.gnu.org/copyleft/lesser.html LGPL
 * @link     http://pear.php.net/package/XML_XRD
 */

/**
 * Generate XML from a XML_XRD object.
 *
 * @category XML
 * @package  XML_XRD
 * @author   Christian Weiske <cweiske@php.net>
 * @license  http://www.gnu.org/copyleft/lesser.html LGPL
 * @version  Release: @package_version@
 * @link     http://pear.php.net/package/XML_XRD
 */
class XML_XRD_Serializer_XML
{
    protected $xrd;

    /**
     * Create new instance
     *
     * @param XML_XRD $xrd XRD instance to convert to XML
     */
    public function __construct(XML_XRD $xrd)
    {
        $this->xrd = $xrd;
    }

    /**
     * Generate XML.
     *
     * @return string Full XML code
     */
    public function __toString()
    {
        $hasXsi = false;
        $x = new XMLWriter();
        $x->openMemory();
        //no encoding means UTF-8
        //http://www.w3.org/TR/2008/REC-xml-20081126/#sec-guessing-no-ext-info
        $x->startDocument('1.0', 'UTF-8');
        $x->setIndent(true);
        $x->startElement('XRD');
        $x->writeAttribute('xmlns', 'http://docs.oasis-open.org/ns/xri/xrd-1.0');
        $x->writeAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
        if ($this->xrd->id) {
            $x->writeAttribute('xml:id', $this->xrd->id);
        }

        if ($this->xrd->expires !== null) {
            $x->writeElement(
                'Expires', gmdate('Y-m-d\TH:i:s\Z', $this->xrd->expires)
            );
        }
        if ($this->xrd->subject !== null) {
            $x->writeElement('Subject', $this->xrd->subject);
        }
        foreach ($this->xrd->aliases as $alias) {
            $x->writeElement('Alias', $alias);
        }
        foreach ($this->xrd->properties as $property) {
            $this->writeProperty($x, $property, $hasXsi);
        }

        foreach ($this->xrd->links as $link) {
            $x->startElement('Link');
            $x->writeAttribute('rel', $link->rel);
            if ($link->type !== null) {
                $x->writeAttribute('type', $link->type);
            }
            if ($link->href !== null) {
                $x->writeAttribute('href', $link->href);
            }
            //template only when no href
            if ($link->template !== null && $link->href === null) {
                $x->writeAttribute('template', $link->template);
            }

            foreach ($link->titles as $lang => $value) {
                $x->startElement('Title');
                if ($lang) {
                    $x->writeAttribute('xml:lang', $lang);
                }
                $x->text($value);
                $x->endElement();
            }
            foreach ($link->properties as $property) {
                $this->writeProperty($x, $property, $hasXsi);
            }
            $x->endElement();
        }

        $x->endElement();
        $x->endDocument();
        $s = $x->flush();
        if (!$hasXsi) {
            $s = str_replace(
                ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"', '', $s
            );
        }
        return $s;
    }

    /**
     * Write a property in the XMLWriter stream output
     *
     * @param XMLWriter                $x        Writer object to write to
     * @param XML_XRD_Element_Property $property Property to write
     * @param boolean                  &$hasXsi  If an xsi: attribute is used
     *
     * @return void
     */
    protected function writeProperty(
        XMLWriter $x, XML_XRD_Element_Property $property, &$hasXsi
    ) {
        $x->startElement('Property');
        $x->writeAttribute('type', $property->type);
        if ($property->value === null) {
            $x->writeAttribute('xsi:nil', 'true');
            $hasXsi = true;
        } else {
            $x->text($property->value);
        }
        $x->endElement();
    }
}

?>


code:
<?php
/**
 * StatusNet - the distributed open-source microblogging tool
 * Copyright (C) 2010, StatusNet, Inc.
 *
 * This class performs lookups based on methods implemented in separate
 * classes, where a resource uri is given. Examples are WebFinger (RFC7033)
 * and the LRDD (Link-based Resource Descriptor Discovery) in RFC6415.
 *
 * PHP version 5
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @category  Discovery
 * @package   GNUsocial
 * @author    James Walker <james@status.net>
 * @author    Mikael Nordfeldth <mmn@hethane.se>
 * @copyright 2010 StatusNet, Inc.
 * @copyright 2013 Free Software Foundation, Inc.
 * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
 * @link      http://www.gnu.org/software/social/
 */

if (!defined('GNUSOCIAL')) { exit(1); }

class Discovery
{
    const LRDD_REL    = 'lrdd';
    const UPDATESFROM = 'http://schemas.google.com/g/2010#updates-from';
    const HCARD       = 'http://microformats.org/profile/hcard';
    const MF2_HCARD   = 'http://microformats.org/profile/h-card';   // microformats2 h-card

    const JRD_MIMETYPE_OLD = 'application/json';    // RFC6415 uses this
    const JRD_MIMETYPE = 'application/jrd+json';
    const XRD_MIMETYPE = 'application/xrd+xml';

    public $methods = array();

    /**
     * Constructor for a discovery object
     *
     * Registers different discovery methods.
     *
     * @return Discovery this
     */

    public function __construct()
    {
        if (Event::handle('StartDiscoveryMethodRegistration', array($this))) {
            Event::handle('EndDiscoveryMethodRegistration', array($this));
        }
    }

    public static function supportedMimeTypes()
    {
        return array('json'=>self::JRD_MIMETYPE,
                     'jsonold'=>self::JRD_MIMETYPE_OLD,
                     'xml'=>self::XRD_MIMETYPE);
    }

    /**
     * Register a discovery class
     *
     * @param string $class Class name
     *
     * @return void
     */
    public function registerMethod($class)
    {
        $this->methods[] = $class;
    }

    /**
     * Given a user ID, return the first available resource descriptor
     *
     * @param string $id User ID URI
     *
     * @return XML_XRD object for the resource descriptor of the id
     */
    public function lookup($id)
    {
        // Normalize the incoming $id to make sure we have a uri
        $uri = self::normalize($id);

        foreach ($this->methods as $class) {
            try {
                $xrd = new XML_XRD();

                common_debug("LRDD discovery method for '$uri': {$class}");
                $lrdd = new $class;
                $links = call_user_func(array($lrdd, 'discover'), $uri);
                $link = Discovery::getService($links, Discovery::LRDD_REL);

                // Load the LRDD XRD
                if (!empty($link->template)) {
                    $xrd_uri = Discovery::applyTemplate($link->template, $uri);
                } elseif (!empty($link->href)) {
                    $xrd_uri = $link->href;
                } else {
                    throw new Exception('No resource descriptor URI in link.');
                }

                $client  = new HTTPClient();
                $headers = array();
                if (!is_null($link->type)) {
                    $headers[] = "Accept: {$link->type}";
                }

                $response = $client->get($xrd_uri, $headers);
                if ($response->getStatus() != 200) {
                    throw new Exception('Unexpected HTTP status code.');
                }

                $xrd->loadString($response->getBody());
                return $xrd;
            } catch (Exception $e) {
                continue;
            }
        }

        // TRANS: Exception. %s is an ID.
        throw new Exception(sprintf(_('Unable to find services for %s.'), $id));
    }

    /**
     * Given an array of links, returns the matching service
     *
     * @param array  $links   Links to check (as instances of XML_XRD_Element_Link)
     * @param string $service Service to find
     *
     * @return array $link assoc array representing the link
     */
    public static function getService(array $links, $service)
    {
        foreach ($links as $link) {
            if ($link->rel === $service) {
                return $link;
            }
            common_debug('LINK: rel '.$link->rel.' !== '.$service);
        }

        throw new Exception('No service link found');
    }

    /**
     * Given a "user id" make sure it's normalized to an acct: uri
     *
     * @param string $user_id User ID to normalize
     *
     * @return string normalized acct: URI
     */
    public static function normalize($uri)
    {
        if (is_null($uri) || $uri==='') {
            throw new Exception(_('No resource given.'));
        }

        $parts = parse_url($uri);
        // If we don't have a scheme, but the path implies user@host,
        // though this is far from a perfect matching procedure...
        if (!isset($parts['scheme']) && isset($parts['path'])
                && preg_match('/[\w@\w]/u', $parts['path'])) {
            return 'acct:' . $uri;
        }

        return $uri;
    }

    public static function isAcct($uri)
    {
        return (mb_strtolower(mb_substr($uri, 0, 5)) == 'acct:');
    }

    /**
     * Apply a template using an ID
     *
     * Replaces {uri} in template string with the ID given.
     *
     * @param string $template Template to match
     * @param string $uri      URI to replace with
     *
     * @return string replaced values
     */
    public static function applyTemplate($template, $uri)
    {
        $template = str_replace('{uri}', urlencode($uri), $template);

        return $template;
    }
}


code:
<?php
/**
 * StatusNet - the distributed open-source microblogging tool
 * Copyright (C) 2010, StatusNet, Inc.
 *
 * Parse HTTP response for interesting Link: headers
 *
 * PHP version 5
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @category  Discovery
 * @package   StatusNet
 * @author    James Walker <james@status.net>
 * @copyright 2010 StatusNet, Inc.
 * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
 * @link      http://status.net/
 */

if (!defined('STATUSNET')) {
    exit(1);
}

/**
 * Class to represent Link: headers in an HTTP response
 *
 * Since these are a fairly important part of Hammer-stack discovery, they're
 * reified and implemented here.
 *
 * @category  Discovery
 * @package   StatusNet
 * @author    James Walker <james@status.net>
 * @copyright 2010 StatusNet, Inc.
 * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
 * @link      http://status.net/
 *
 * @see       Discovery
 */
class LinkHeader
{
    var $href;
    var $rel;
    var $type;

    /**
     * Initialize from a string
     *
     * @param string $str Link: header value
     *
     * @return LinkHeader self
     */
    function __construct($str)
    {
        preg_match('/^<[^>]+>/', $str, $uri_reference);
        //if (empty($uri_reference)) return;

        $this->href = trim($uri_reference[0], '<>');
        $this->rel  = array();
        $this->type = null;

        // remove uri-reference from header
        $str = substr($str, strlen($uri_reference[0]));

        // parse link-params
        $params = explode(';', $str);

        foreach ($params as $param) {
            if (empty($param)) {
                continue;
            }
            list($param_name, $param_value) = explode('=', $param, 2);

            $param_name  = trim($param_name);
            $param_value = preg_replace('(^"|"$)', '', trim($param_value));

            // for now we only care about 'rel' and 'type' link params
            // TODO do something with the other links-params
            switch ($param_name) {
            case 'rel':
                $this->rel = trim($param_value);
                break;

            case 'type':
                $this->type = trim($param_value);
            }
        }
    }

    /**
     * Given an HTTP response, return the requested Link: header
     *
     * @param HTTP_Request2_Response $response response to check
     * @param string                 $rel      relationship to look for
     * @param string                 $type     media type to look for
     *
     * @return LinkHeader discovered header, or null on failure
     */
    static function getLink($response, $rel=null, $type=null)
    {
        $headers = $response->getHeader('Link');
        if ($headers) {
            // Can get an array or string, so try to simplify the path
            if (!is_array($headers)) {
                $headers = array($headers);
            }

            foreach ($headers as $header) {
                $lh = new LinkHeader($header);

                if ((is_null($rel) || $lh->rel == $rel) &&
                    (is_null($type) || $lh->type == $type)) {
                    return $lh->href;
                }
            }
        }
        return null;
    }
}


code:
<?php
/**
 * Abstract class for LRDD discovery methods
 *
 * Objects that extend this class can retrieve an array of
 * resource descriptor links for the URI. The array consists
 * of XML_XRD_Element_Link elements.
 *
 * @category  Discovery
 * @package   StatusNet
 * @author    James Walker <james@status.net>
 * @copyright 2010 StatusNet, Inc.
 * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
 * @link      http://status.net/
 */
abstract class LRDDMethod
{
    protected $xrd = null;

    public function __construct() {
        $this->xrd = new XML_XRD();
    }

    /**
     * Discover interesting info about the URI
     *
     * @param string $uri URI to inquire about
     *
     * @return array of XML_XRD_Element_Link elements to discovered resource descriptors
     */
    abstract public function discover($uri);

    protected function fetchUrl($url, $method=HTTPClient::METHOD_GET)
    {
        $client  = new HTTPClient();

        // GAAHHH, this method sucks! How about we make a better HTTPClient interface?
        switch ($method) {
        case HTTPClient::METHOD_GET:
            $response = $client->get($url);
            break;
        case HTTPClient::METHOD_HEAD:
            $response = $client->head($url);
            break;
        default:
            throw new Exception('Bad HTTP method.');
        }

        if ($response->getStatus() != 200) {
            throw new Exception('Unexpected HTTP status code.');
        }

        return $response;
    }
}


code:
<?php
/**
 * Implementation of discovery using host-meta file
 *
 * Discovers resource descriptor file for a user by going to the
 * organization's host-meta file and trying to find a template for LRDD.
 *
 * @category  Discovery
 * @package   StatusNet
 * @author    James Walker <james@status.net>
 * @copyright 2010 StatusNet, Inc.
 * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
 * @link      http://status.net/
 */
class LRDDMethod_HostMeta extends LRDDMethod
{
    /**
     * For RFC6415 and HTTP URIs, fetch the host-meta file
     * and look for LRDD templates
     */
    public function discover($uri)
    {
        // This is allowed for RFC6415 but not the 'WebFinger' RFC7033.
        $try_schemes = array('https', 'http');

        $scheme = mb_strtolower(parse_url($uri, PHP_URL_SCHEME));
        switch ($scheme) {
        case 'acct':
            if (!Discovery::isAcct($uri)) {
                throw new Exception('Bad resource URI: '.$uri);
            }
            // We can't use parse_url data for this, since the 'host'
            // entry is only set if the scheme has '://' after it.
            list($user, $domain) = explode('@', parse_url($uri, PHP_URL_PATH));
            break;
        case 'http':
        case 'https':
            $domain = mb_strtolower(parse_url($uri, PHP_URL_HOST));
            $try_schemes = array($scheme);
            break;
        default:
            throw new Exception('Unable to discover resource descriptor endpoint.');
        }

        foreach ($try_schemes as $scheme) {
            $url = $scheme . '://' . $domain . '/.well-known/host-meta';

            try {
                $response = self::fetchUrl($url);
                $this->xrd->loadString($response->getBody());
            } catch (Exception $e) {
                common_debug('LRDD could not load resource descriptor: '.$url.' ('.$e->getMessage().')');
                continue;
            }
            return $this->xrd->links;
        }

        throw new Exception('Unable to retrieve resource descriptor links.');
    }
}


code:
<?php
/**
 * Implementation of discovery using HTTP Link header
 *
 * Discovers XRD file for a user by fetching the URL and reading any
 * Link: headers in the HTTP response.
 *
 * @category  Discovery
 * @package   StatusNet
 * @author    James Walker <james@status.net>
 * @copyright 2010 StatusNet, Inc.
 * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
 * @link      http://status.net/
 */
class LRDDMethod_LinkHeader extends LRDDMethod
{
    /**
     * For HTTP IDs fetch the URL and look for Link headers.
     *
     * @todo fail out of WebFinger URIs faster
     */
    public function discover($uri)
    {
        $response = self::fetchUrl($uri, HTTPClient::METHOD_HEAD);

        $link_header = $response->getHeader('Link');
        if (empty($link_header)) {
            throw new Exception('No Link header found');
        }
        common_debug('LRDD LinkHeader found: '.var_export($link_header,true));

        return self::parseHeader($link_header);
    }

    /**
     * Given a string or array of headers, returns JRD-like assoc array
     *
     * @param string|array $header string or array of strings for headers
     *
     * @return array of associative arrays in JRD-like array format
     */
    protected static function parseHeader($header)
    {
        $lh = new LinkHeader($header);

        $link = new XML_XRD_Element_Link($lh->rel, $lh->href, $lh->type);

        return array($link);
    }
}


code:
<?php
/**
 * Implementation of discovery using HTML <link> element
 *
 * Discovers XRD file for a user by fetching the URL and reading any
 * <link> elements in the HTML response.
 *
 * @category  Discovery
 * @package   StatusNet
 * @author    James Walker <james@status.net>
 * @copyright 2010 StatusNet, Inc.
 * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
 * @link      http://status.net/
 */
class LRDDMethod_LinkHTML extends LRDDMethod
{
    /**
     * For HTTP IDs, fetch the URL and look for <link> elements
     * in the HTML response.
     *
     * @todo fail out of WebFinger URIs faster
     */
    public function discover($uri)
    {
        $response = self::fetchUrl($uri);

        return self::parse($response->getBody());
    }

    /**
     * Parse HTML and return <link> elements
     *
     * Given an HTML string, scans the string for <link> elements
     *
     * @param string $html HTML to scan
     *
     * @return array array of associative arrays in JRD-ish array format
     */
    public function parse($html)
    {
        $links = array();

        preg_match('/<head(\s[^>]*)?>(.*?)<\/head>/is', $html, $head_matches);
        $head_html = $head_matches[2];

        preg_match_all('/<link\s[^>]*>/i', $head_html, $link_matches);

        foreach ($link_matches[0] as $link_html) {
            $link_url  = null;
            $link_rel  = null;
            $link_type = null;

            preg_match('/\srel=(("|\')([^\\2]*?)\\2|[^"\'\s]+)/i', $link_html, $rel_matches);
            if ( isset($rel_matches[3]) ) {
                $link_rel = $rel_matches[3];
            } else if ( isset($rel_matches[1]) ) {
                $link_rel = $rel_matches[1];
            }

            preg_match('/\shref=(("|\')([^\\2]*?)\\2|[^"\'\s]+)/i', $link_html, $href_matches);
            if ( isset($href_matches[3]) ) {
                $link_uri = $href_matches[3];
            } else if ( isset($href_matches[1]) ) {
                $link_uri = $href_matches[1];
            }

            preg_match('/\stype=(("|\')([^\\2]*?)\\2|[^"\'\s]+)/i', $link_html, $type_matches);
            if ( isset($type_matches[3]) ) {
                $link_type = $type_matches[3];
            } else if ( isset($type_matches[1]) ) {
                $link_type = $type_matches[1];
            }

            $links[] = new XML_XRD_Element_Link($link_rel, $link_uri, $link_type);
        }

        return $links;
    }
}


code:
<?php
/**
 * Implementation of WebFinger resource discovery (RFC7033)
 *
 * @category  Discovery
 * @package   GNUsocial
 * @author    Mikael Nordfeldth <mmn@hethane.se>
 * @copyright 2013 Free Software Foundation, Inc.
 * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
 * @link      http://status.net/
 */
class LRDDMethod_WebFinger extends LRDDMethod
{
    /**
     * Simply returns the WebFinger URL over HTTPS at the uri's domain:
     * https://{domain}/.well-known/webfinger?resource={uri}
     */
    public function discover($uri)
    {
        if (!Discovery::isAcct($uri)) {
            throw new Exception('Bad resource URI: '.$uri);
        }
        list($user, $domain) = explode('@', parse_url($uri, PHP_URL_PATH));
        if (!filter_var($domain, FILTER_VALIDATE_IP)
                && !filter_var(gethostbyname($domain), FILTER_VALIDATE_IP)) {
            throw new Exception('Bad resource host.');
        }

        $link = new XML_XRD_Element_Link(
                        Discovery::LRDD_REL,
                        'https://' . $domain . '/.well-known/webfinger?resource={uri}',
                        Discovery::JRD_MIMETYPE,
                        true);  //isTemplate

        return array($link);
    }
}


code:
<?php
/**
 * StatusNet, the distributed open-source microblogging tool
 *
 * Plugin to enable LDAP Authentication
 *
 * PHP version 5
 *
 * LICENCE: This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @category  Plugin
 * @package   StatusNet
 * @author    Craig Andrews <candrews@integralblue.com>
 * @copyright 2009 Free Software Foundation, Inc http://www.fsf.org
 * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
 * @link      http://status.net/
 */

if (!defined('STATUSNET') && !defined('LACONICA')) {
    exit(1);
}

class LdapAuthenticationPlugin extends AuthenticationPlugin
{
    function onInitializePlugin(){
        parent::onInitializePlugin();
        if(!isset($this->attributes['nickname'])){
            // TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
            throw new Exception(_m('You must specify a nickname attribute.'));
        }
        if($this->password_changeable && (! isset($this->attributes['password']) || !isset($this->password_encoding))){
            // TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
            throw new Exception(_m('If password_changeable is set, the password attribute and password_encoding must also be specified.'));
        }
        $this->ldapCommon = new LdapCommon(get_object_vars($this));
    }

    function onAutoload($cls)
    {
        switch ($cls)
        {
         case 'LdapCommon':
            require_once(INSTALLDIR.'/plugins/LdapCommon/LdapCommon.php');
            return false;
        }

        return parent::onAutoload($cls);
    }

    function onEndShowPageNotice($action)
    {
        $name = $action->trimmed('action');
        $instr = false;

        switch ($name)
        {
         case 'register':
            if($this->autoregistration) {
                // TRANS: Instructions for LDAP authentication.
                $instr = _m('Do you have an LDAP account? Use your standard username and password.');
            }
            break;
         case 'login':
            // TRANS: Instructions for LDAP authentication.
            $instr = _m('Do you have an LDAP account? Use your standard username and password.');
            break;
         default:
            return true;
        }

        if($instr) {
            $output = common_markup_to_html($instr);
            $action->raw($output);
        }
        return true;
    }

    //---interface implementation---//

    function checkPassword($username, $password)
    {
        return $this->ldapCommon->checkPassword($username,$password);
    }

    function autoRegister($username, $nickname)
    {
        if(is_null($nickname)){
            $nickname = $username;
        }
        $entry = $this->ldapCommon->get_user($username,$this->attributes);
        if($entry){
            $registration_data = array();
            foreach($this->attributes as $sn_attribute=>$ldap_attribute){
                //ldap won't let us read a user's password,
                //and we're going to set the password to a random string later anyways,
                //so don't bother trying to read it.
                if($sn_attribute != 'password'){
                    $registration_data[$sn_attribute]=$entry->getValue($ldap_attribute,'single');
                }
            }
            if(isset($registration_data['email']) && !empty($registration_data['email'])){
                $registration_data['email_confirmed']=true;
            }
            $registration_data['nickname'] = $nickname;
            //set the database saved password to a random string.
            $registration_data['password']=common_random_hexstr(16);
            return User::register($registration_data);
        }else{
            //user isn't in ldap, so we cannot register him
            return false;
        }
    }

    function changePassword($username,$oldpassword,$newpassword)
    {
        return $this->ldapCommon->changePassword($username,$oldpassword,$newpassword);
    }

    function suggestNicknameForUsername($username)
    {
        $entry = $this->ldapCommon->get_user($username, $this->attributes);
        if(!$entry){
            //this really shouldn't happen
            $nickname = $username;
        }else{
            $nickname = $entry->getValue($this->attributes['nickname'],'single');
            if(!$nickname){
                $nickname = $username;
            }
        }
        return common_nicknamize($nickname);
    }

    function onPluginVersion(&$versions)
    {
        $versions[] = array('name' => 'LDAP Authentication',
                            'version' => GNUSOCIAL_VERSION,
                            'author' => 'Craig Andrews',
                            'homepage' => 'http://status.net/wiki/Plugin:LdapAuthentication',
                            'rawdescription' =>
                            // TRANS: Plugin description.
                            _m('The LDAP Authentication plugin allows for StatusNet to handle authentication through LDAP.'));
        return true;
    }
}


code:
The LDAP Authentication plugin allows for StatusNet to handle authentication
through LDAP.

Installation
============
add "addPlugin('ldapAuthentication',
    array('setting'=>'value', 'setting2'=>'value2', ...);"
to the bottom of your config.php

Settings
========
provider_name*: This is a identifier designated to the connection.
    It's how StatusNet will refer to the authentication source.
    For the most part, any name can be used, so long as each authentication
    source has a different identifier. In most cases there will be only one
    authentication source used.
authoritative (false): Set to true if LDAP's responses are authoritative
    (if authorative and LDAP fails, no other password checking will be done).
autoregistration (false): Set to true if users should be automatically created
    when they attempt to login.
email_changeable (true): Are users allowed to change their email address?
    (true or false)
password_changeable (true): Are users allowed to change their passwords?
    (true or false)
password_encoding: required if users are to be able to change their passwords
    Possible values are: crypt, ext_des, md5crypt, blowfish, md5, sha, ssha,
        smd5, ad, clear

host*: LDAP server name to connect to. You can provide several hosts in an
    array in which case the hosts are tried from left to right.
    See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
port: Port on the server.
    See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
version: LDAP version.
    See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
starttls: TLS is started after connecting.
    See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
binddn: The distinguished name to bind as (username).
    See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
bindpw: Password for the binddn.
    See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
basedn*: LDAP base name (root directory).
    See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
options: See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
filter: Default search filter.
    See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
scope: Default search scope.
    See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
schema_cachefile: File location to store ldap schema.
schema_maxage: TTL for cache file.

attributes: an array that relates StatusNet user attributes to LDAP ones
    username*: LDAP attribute value entered when authenticating to StatusNet
    nickname*: LDAP attribute value shown as the user's nickname
    email
    fullname
    homepage
    location
    password: required if users are to be able to change their passwords

* required
default values are in (parenthesis)

For most LDAP installations, the "nickname" and "username" attributes should
    be the same.

Example
=======
Here's an example of an LDAP plugin configuration that connects to
    Microsoft Active Directory.

addPlugin('ldapAuthentication', array(
    'provider_name'=>'Example',
    'authoritative'=>true,
    'autoregistration'=>true,
    'binddn'=>'username',
    'bindpw'=>'password',
    'basedn'=>'OU=Users,OU=StatusNet,OU=US,DC=americas,DC=global,DC=loc',
    'host'=>array('server1', 'server2'),
    'password_encoding'=>'ad',
    'attributes'=>array(
        'username'=>'sAMAccountName',
        'nickname'=>'sAMAccountName',
        'email'=>'mail',
        'fullname'=>'displayName',
        'password'=>'unicodePwd')
));

path: plugins/LdapAuthentication/README


code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
#: LdapAuthenticationPlugin.php:40
msgid "You must specify a nickname attribute."
msgstr ""

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
#: LdapAuthenticationPlugin.php:44
msgid ""
"If password_changeable is set, the password attribute and password_encoding "
"must also be specified."
msgstr ""

#. TRANS: Instructions for LDAP authentication.
#: LdapAuthenticationPlugin.php:69 LdapAuthenticationPlugin.php:74
msgid "Do you have an LDAP account? Use your standard username and password."
msgstr ""

#. TRANS: Plugin description.
#: LdapAuthenticationPlugin.php:151
msgid ""
"The LDAP Authentication plugin allows for StatusNet to handle authentication "
"through LDAP."
msgstr ""


code:
# Translation of StatusNet - LdapAuthentication to German (Deutsch)
# Exported from translatewiki.net
#
# Author: Fujnky
# Author: MF-Warburg
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - LdapAuthentication\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:08:56+0000\n"
"Language-Team: German <https://translatewiki.net/wiki/Portal:de>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:50:24+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: de\n"
"X-Message-Group: #out-statusnet-plugin-ldapauthentication\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid "You must specify a nickname attribute."
msgstr "Du musst ein Nick-Atrribut angeben."

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid ""
"If password_changeable is set, the password attribute and password_encoding "
"must also be specified."
msgstr ""
"Wenn „password_changeable“ eingestellt ist, müssen auch das Passwort-"
"Attribut und „password_encoding“ angegeben werden."

#. TRANS: Instructions for LDAP authentication.
msgid "Do you have an LDAP account? Use your standard username and password."
msgstr ""
"Hast du ein LDAP-Konto? Verwende deinen Standard-Benutzernamen und -Passwort."

#. TRANS: Plugin description.
msgid ""
"The LDAP Authentication plugin allows for StatusNet to handle authentication "
"through LDAP."
msgstr ""
"Das LDAP-Authentifizierungs-Plugin erlaubt es StatusNet, die "
"Authentifizierung durch LDAP abzuwickeln."


code:
# Translation of StatusNet - LdapAuthentication to Spanish (español)
# Exported from translatewiki.net
#
# Author: Armando-Martin
# Author: Translationista
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - LdapAuthentication\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:08:56+0000\n"
"Language-Team: Spanish <http://translatewiki.net/wiki/Portal:es>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:50:24+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: es\n"
"X-Message-Group: #out-statusnet-plugin-ldapauthentication\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid "You must specify a nickname attribute."
msgstr "Debe especificar un atributo de pseudónimo (nickname)."

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid ""
"If password_changeable is set, the password attribute and password_encoding "
"must also be specified."
msgstr ""
"Si \"password_changeable\" está definido, debe especificar el atributo de "
"contraseña (password) y de \"password_encoding\"."

#. TRANS: Instructions for LDAP authentication.
msgid "Do you have an LDAP account? Use your standard username and password."
msgstr ""
"¿Tiene una cuenta LDAP? Utilice su nombre de usuario estándar y su "
"contraseña."

#. TRANS: Plugin description.
msgid ""
"The LDAP Authentication plugin allows for StatusNet to handle authentication "
"through LDAP."
msgstr ""
"La extensión de Autenticación LDAP permite a StatusNet manejar la "
"autenticación a través de LDAP."


code:
# Translation of StatusNet - LdapAuthentication to Basque (euskara)
# Exported from translatewiki.net
#
# Author: Artsuaga
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - LdapAuthentication\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:08:56+0000\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:50:24+0000\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid "You must specify a nickname attribute."
msgstr "Ezizenaren ezaugarri bat gehitu behar duzu."

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid ""
"If password_changeable is set, the password attribute and password_encoding "
"must also be specified."
msgstr ""
"\"password_changeable\" definiturik badago, pasahitzaren (password) eta "
"\"password_encoding\"-en ezaugarria zehaztu."

#. TRANS: Instructions for LDAP authentication.
msgid "Do you have an LDAP account? Use your standard username and password."
msgstr ""
"Baduzu LDAP konturik? Erabili zure erabiltzaile eta pasahitz estandarra."

#. TRANS: Plugin description.
msgid ""
"The LDAP Authentication plugin allows for StatusNet to handle authentication "
"through LDAP."
msgstr ""
"LDAP autentifikazio pluginak StatusNeti autentikazioa LDAP bidez kudeatzen "
"uzten dio."


code:
# Translation of StatusNet - LdapAuthentication to Finnish (Suomi)
# Exported from translatewiki.net
#
# Author: Nike
# Author: XTL
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - LdapAuthentication\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-04-27 12:36+0000\n"
"PO-Revision-Date: 2011-04-27 12:37:26+0000\n"
"Language-Team: Finnish <http://translatewiki.net/wiki/Portal:fi>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-03-24 15:25:06+0000\n"
"X-Generator: MediaWiki 1.18alpha (r87008); Translate extension (2011-04-26)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: fi\n"
"X-Message-Group: #out-statusnet-plugin-ldapauthentication\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid "You must specify a nickname attribute."
msgstr ""

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid ""
"If password_changeable is set, the password attribute and password_encoding "
"must also be specified."
msgstr ""

#. TRANS: Instructions for LDAP authentication.
msgid "Do you have an LDAP account? Use your standard username and password."
msgstr ""

#. TRANS: Plugin description.
msgid ""
"The LDAP Authentication plugin allows for StatusNet to handle authentication "
"through LDAP."
msgstr ""
"LDAP-liitännäinen mahdollistaa StatusNet-käyttäjien tunnistamisen LDAPin "
"kautta."


code:
# Translation of StatusNet - LdapAuthentication to French (français)
# Exported from translatewiki.net
#
# Author: Crochet.david
# Author: Hashar
# Author: McDutchie
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - LdapAuthentication\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:08:56+0000\n"
"Language-Team: French <https://translatewiki.net/wiki/Portal:fr>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:50:24+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: fr\n"
"X-Message-Group: #out-statusnet-plugin-ldapauthentication\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid "You must specify a nickname attribute."
msgstr "Vous devez spécifier l'attribut pseudonyme"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid ""
"If password_changeable is set, the password attribute and password_encoding "
"must also be specified."
msgstr ""
"Si password_changeable est définie, l’attribut de mot de passe et "
"password_encoding doivent également être précisés."

#. TRANS: Instructions for LDAP authentication.
msgid "Do you have an LDAP account? Use your standard username and password."
msgstr ""
"Avez-vous un compte LDAP ? Utilisez votre nom d’utilisateur et mot de passe "
"standard."

#. TRANS: Plugin description.
msgid ""
"The LDAP Authentication plugin allows for StatusNet to handle authentication "
"through LDAP."
msgstr ""
"L’extension LDAP Authentication permet à StatusNet de gérer l’identification "
"par LDAP."


code:
# Translation of StatusNet - LdapAuthentication to Galician (galego)
# Exported from translatewiki.net
#
# Author: Toliño
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - LdapAuthentication\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:08:56+0000\n"
"Language-Team: Galician <https://translatewiki.net/wiki/Portal:gl>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:50:24+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: gl\n"
"X-Message-Group: #out-statusnet-plugin-ldapauthentication\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid "You must specify a nickname attribute."
msgstr "Cómpre especificar o atributo do alcume."

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid ""
"If password_changeable is set, the password attribute and password_encoding "
"must also be specified."
msgstr ""
"Se \"password_changeable\" está definido, cómpre especificar o atributo do "
"contrasinal e \"password_encoding\"."

#. TRANS: Instructions for LDAP authentication.
msgid "Do you have an LDAP account? Use your standard username and password."
msgstr ""
"Ten unha conta LDAP? Use o seu nome de usuario e o seu contrasinal estándar."

#. TRANS: Plugin description.
msgid ""
"The LDAP Authentication plugin allows for StatusNet to handle authentication "
"through LDAP."
msgstr ""
"O complemento de autenticación LDAP permite a StatusNet manexar a "
"autenticación a través do LDAP."


code:
# Translation of StatusNet - LdapAuthentication to Hebrew (עברית)
# Exported from translatewiki.net
#
# Author: YaronSh
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - LdapAuthentication\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-04-27 12:36+0000\n"
"PO-Revision-Date: 2011-04-27 12:37:27+0000\n"
"Language-Team: Hebrew <http://translatewiki.net/wiki/Portal:he>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-03-24 15:25:06+0000\n"
"X-Generator: MediaWiki 1.18alpha (r87008); Translate extension (2011-04-26)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: he\n"
"X-Message-Group: #out-statusnet-plugin-ldapauthentication\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid "You must specify a nickname attribute."
msgstr ""

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid ""
"If password_changeable is set, the password attribute and password_encoding "
"must also be specified."
msgstr ""

#. TRANS: Instructions for LDAP authentication.
msgid "Do you have an LDAP account? Use your standard username and password."
msgstr ""

#. TRANS: Plugin description.
msgid ""
"The LDAP Authentication plugin allows for StatusNet to handle authentication "
"through LDAP."
msgstr "תוסף האימות מול LDAP מאפשר ל־StatusNet לטפל באימות דרך LDAP."


code:
# Translation of StatusNet - LdapAuthentication to Interlingua (interlingua)
# Exported from translatewiki.net
#
# Author: McDutchie
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - LdapAuthentication\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:08:56+0000\n"
"Language-Team: Interlingua <https://translatewiki.net/wiki/Portal:ia>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:50:24+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: ia\n"
"X-Message-Group: #out-statusnet-plugin-ldapauthentication\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid "You must specify a nickname attribute."
msgstr "Es necessari specificar un attributo de pseudonymo."

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid ""
"If password_changeable is set, the password attribute and password_encoding "
"must also be specified."
msgstr ""
"Si \"password_changeable\" es definite, le attributo \"password\" e le "
"\"password_encoding\" debe equalmente esser specificate."

#. TRANS: Instructions for LDAP authentication.
msgid "Do you have an LDAP account? Use your standard username and password."
msgstr "Ha tu un conto LDAP? Usa tu nomine de usator e contrasigno standard."

#. TRANS: Plugin description.
msgid ""
"The LDAP Authentication plugin allows for StatusNet to handle authentication "
"through LDAP."
msgstr ""
"Le plug-in LDAP Authentication permitte que StatusNet manea le "
"authentication via LDAP."


code:
# Translation of StatusNet - LdapAuthentication to Indonesian (Bahasa Indonesia)
# Exported from translatewiki.net
#
# Author: Farras
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - LdapAuthentication\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-04-27 12:36+0000\n"
"PO-Revision-Date: 2011-04-27 12:37:27+0000\n"
"Language-Team: Indonesian <http://translatewiki.net/wiki/Portal:id>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-03-24 15:25:06+0000\n"
"X-Generator: MediaWiki 1.18alpha (r87008); Translate extension (2011-04-26)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: id\n"
"X-Message-Group: #out-statusnet-plugin-ldapauthentication\n"
"Plural-Forms: nplurals=1; plural=0;\n"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid "You must specify a nickname attribute."
msgstr ""

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid ""
"If password_changeable is set, the password attribute and password_encoding "
"must also be specified."
msgstr ""

#. TRANS: Instructions for LDAP authentication.
msgid "Do you have an LDAP account? Use your standard username and password."
msgstr ""

#. TRANS: Plugin description.
msgid ""
"The LDAP Authentication plugin allows for StatusNet to handle authentication "
"through LDAP."
msgstr ""
"Pengaya LDAP Authentication memungkinkan StatusNet untuk menangani "
"autentikasi melalui LDAP."


code:
# Translation of StatusNet - LdapAuthentication to Italian (italiano)
# Exported from translatewiki.net
#
# Author: GreenFox
# Author: Ximo17
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - LdapAuthentication\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:08:56+0000\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:50:24+0000\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid "You must specify a nickname attribute."
msgstr "Dovete specificare l'attributo soprannome"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid ""
"If password_changeable is set, the password attribute and password_encoding "
"must also be specified."
msgstr ""
"Se password_changeable è definito, anche l'attributo password e "
"password_encoding deve essere specificato."

#. TRANS: Instructions for LDAP authentication.
msgid "Do you have an LDAP account? Use your standard username and password."
msgstr ""
"Hai un account LDAP? Utilizza il tuo username standard e la tua password."

#. TRANS: Plugin description.
msgid ""
"The LDAP Authentication plugin allows for StatusNet to handle authentication "
"through LDAP."
msgstr ""
"L'estensione LDAP Authentication permette a StatusNet di gestire "
"l'autenticazione attraverso LDAP."


code:
# Translation of StatusNet - LdapAuthentication to Japanese (日本語)
# Exported from translatewiki.net
#
# Author: 青子守歌
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - LdapAuthentication\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-04-27 12:36+0000\n"
"PO-Revision-Date: 2011-04-27 12:37:27+0000\n"
"Language-Team: Japanese <http://translatewiki.net/wiki/Portal:ja>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-03-24 15:25:06+0000\n"
"X-Generator: MediaWiki 1.18alpha (r87008); Translate extension (2011-04-26)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: ja\n"
"X-Message-Group: #out-statusnet-plugin-ldapauthentication\n"
"Plural-Forms: nplurals=1; plural=0;\n"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid "You must specify a nickname attribute."
msgstr ""

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid ""
"If password_changeable is set, the password attribute and password_encoding "
"must also be specified."
msgstr ""

#. TRANS: Instructions for LDAP authentication.
msgid "Do you have an LDAP account? Use your standard username and password."
msgstr ""

#. TRANS: Plugin description.
msgid ""
"The LDAP Authentication plugin allows for StatusNet to handle authentication "
"through LDAP."
msgstr ""
"LDAP認証プラグインは、StatusNetにLDAPによる認証を処理させることができます。"


code:
# Translation of StatusNet - LdapAuthentication to Macedonian (македонски)
# Exported from translatewiki.net
#
# Author: Bjankuloski06
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - LdapAuthentication\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:08:56+0000\n"
"Language-Team: Macedonian <https://translatewiki.net/wiki/Portal:mk>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:50:24+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: mk\n"
"X-Message-Group: #out-statusnet-plugin-ldapauthentication\n"
"Plural-Forms: nplurals=2; plural=(n == 1 || n%10 == 1) ? 0 : 1;\n"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid "You must specify a nickname attribute."
msgstr "Мора да наведете атрибут за прекар."

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid ""
"If password_changeable is set, the password attribute and password_encoding "
"must also be specified."
msgstr ""
"Ако е зададено „password_changeable“, тогаш мора да бидат наведени и "
"атрибутот за лозинка и „password_encoding“."

#. TRANS: Instructions for LDAP authentication.
msgid "Do you have an LDAP account? Use your standard username and password."
msgstr ""
"Дали имате сметка на LDAP? Употребете го Вашето стадардно корисничко име и "
"лозинка."

#. TRANS: Plugin description.
msgid ""
"The LDAP Authentication plugin allows for StatusNet to handle authentication "
"through LDAP."
msgstr ""
"Приклучокот за потврдување LDAP му овозможува на StatusNet да работи со "
"потврдувања преку LDAP."


code:
# Translation of StatusNet - LdapAuthentication to Norwegian (bokmål) (Norsk (bokmål))
# Exported from translatewiki.net
#
# Author: Nghtwlkr
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - LdapAuthentication\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-04-27 12:36+0000\n"
"PO-Revision-Date: 2011-04-27 12:37:27+0000\n"
"Language-Team: Norwegian (bokmål) <http://translatewiki.net/wiki/Portal:no>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-03-24 15:25:06+0000\n"
"X-Generator: MediaWiki 1.18alpha (r87008); Translate extension (2011-04-26)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: no\n"
"X-Message-Group: #out-statusnet-plugin-ldapauthentication\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid "You must specify a nickname attribute."
msgstr ""

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid ""
"If password_changeable is set, the password attribute and password_encoding "
"must also be specified."
msgstr ""

#. TRANS: Instructions for LDAP authentication.
msgid "Do you have an LDAP account? Use your standard username and password."
msgstr ""

#. TRANS: Plugin description.
msgid ""
"The LDAP Authentication plugin allows for StatusNet to handle authentication "
"through LDAP."
msgstr ""
"Utvidelsen LDAP Authentication gjør det mulig for StatusNet å håndtere "
"autentisering gjennom LDAP."


code:
# Translation of StatusNet - LdapAuthentication to Dutch (Nederlands)
# Exported from translatewiki.net
#
# Author: SPQRobin
# Author: Siebrand
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - LdapAuthentication\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:08:56+0000\n"
"Language-Team: Dutch <https://translatewiki.net/wiki/Portal:nl>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:50:24+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: nl\n"
"X-Message-Group: #out-statusnet-plugin-ldapauthentication\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid "You must specify a nickname attribute."
msgstr "U moet een nickname-attribuut opgeven."

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid ""
"If password_changeable is set, the password attribute and password_encoding "
"must also be specified."
msgstr ""
"Als \"password_changeable\" is ingesteld, moeten de eigenschappen \"password"
"\" en \"password_encoding\" ook ingesteld worden."

#. TRANS: Instructions for LDAP authentication.
msgid "Do you have an LDAP account? Use your standard username and password."
msgstr ""
"Heeft u een LDAP-account? Gebruik uw standaard gebruikersnaam en wachtwoord."

#. TRANS: Plugin description.
msgid ""
"The LDAP Authentication plugin allows for StatusNet to handle authentication "
"through LDAP."
msgstr ""
"De plug-in LDAP-authenticatie maakt het mogelijk om authenticatie voor "
"StatusNet via LDAP af te handelen."


code:
# Translation of StatusNet - LdapAuthentication to Portuguese (Português)
# Exported from translatewiki.net
#
# Author: Waldir
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - LdapAuthentication\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-04-27 12:36+0000\n"
"PO-Revision-Date: 2011-04-27 12:37:27+0000\n"
"Language-Team: Portuguese <http://translatewiki.net/wiki/Portal:pt>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-03-24 15:25:06+0000\n"
"X-Generator: MediaWiki 1.18alpha (r87008); Translate extension (2011-04-26)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: pt\n"
"X-Message-Group: #out-statusnet-plugin-ldapauthentication\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid "You must specify a nickname attribute."
msgstr ""

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid ""
"If password_changeable is set, the password attribute and password_encoding "
"must also be specified."
msgstr ""

#. TRANS: Instructions for LDAP authentication.
msgid "Do you have an LDAP account? Use your standard username and password."
msgstr ""

#. TRANS: Plugin description.
msgid ""
"The LDAP Authentication plugin allows for StatusNet to handle authentication "
"through LDAP."
msgstr ""
"O plug-in de autenticação LDAP permite ao StatusNet efectuar autenticações "
"através de LDAP."


code:
# Translation of StatusNet - LdapAuthentication to Brazilian Portuguese (Português do Brasil)
# Exported from translatewiki.net
#
# Author: Giro720
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - LdapAuthentication\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-04-27 12:36+0000\n"
"PO-Revision-Date: 2011-04-27 12:37:27+0000\n"
"Language-Team: Brazilian Portuguese <http://translatewiki.net/wiki/Portal:pt-"
"br>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-03-24 15:25:06+0000\n"
"X-Generator: MediaWiki 1.18alpha (r87008); Translate extension (2011-04-26)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: pt-br\n"
"X-Message-Group: #out-statusnet-plugin-ldapauthentication\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid "You must specify a nickname attribute."
msgstr ""

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid ""
"If password_changeable is set, the password attribute and password_encoding "
"must also be specified."
msgstr ""

#. TRANS: Instructions for LDAP authentication.
msgid "Do you have an LDAP account? Use your standard username and password."
msgstr ""

#. TRANS: Plugin description.
msgid ""
"The LDAP Authentication plugin allows for StatusNet to handle authentication "
"through LDAP."
msgstr ""
"O plugin de autenticação LDAP permite ao StatusNet manejar a autenticação "
"através de LDAP."


code:
# Translation of StatusNet - LdapAuthentication to Russian (Русский)
# Exported from translatewiki.net
#
# Author: Eleferen
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - LdapAuthentication\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-04-27 12:36+0000\n"
"PO-Revision-Date: 2011-04-27 12:37:27+0000\n"
"Language-Team: Russian <http://translatewiki.net/wiki/Portal:ru>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-03-24 15:25:06+0000\n"
"X-Generator: MediaWiki 1.18alpha (r87008); Translate extension (2011-04-26)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: ru\n"
"X-Message-Group: #out-statusnet-plugin-ldapauthentication\n"
"Plural-Forms: nplurals=3; plural=(n%10 == 1 && n%100 != 11) ? 0 : ( (n%10 >= "
"2 && n%10 <= 4 && (n%100 < 10 || n%100 >= 20)) ? 1 : 2 );\n"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid "You must specify a nickname attribute."
msgstr ""

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid ""
"If password_changeable is set, the password attribute and password_encoding "
"must also be specified."
msgstr ""

#. TRANS: Instructions for LDAP authentication.
msgid "Do you have an LDAP account? Use your standard username and password."
msgstr ""

#. TRANS: Plugin description.
msgid ""
"The LDAP Authentication plugin allows for StatusNet to handle authentication "
"through LDAP."
msgstr ""
"Плагин аутентификации LDAP позволяет обрабатывать запросы к StatusNet через "
"сетевой протокол LDAP."


code:
# Translation of StatusNet - LdapAuthentication to Tagalog (Tagalog)
# Exported from translatewiki.net
#
# Author: AnakngAraw
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - LdapAuthentication\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:08:57+0000\n"
"Language-Team: Tagalog <https://translatewiki.net/wiki/Portal:tl>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:50:24+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: tl\n"
"X-Message-Group: #out-statusnet-plugin-ldapauthentication\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid "You must specify a nickname attribute."
msgstr "Dapat kang tumukoy ng isang katangian ng palayaw."

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid ""
"If password_changeable is set, the password attribute and password_encoding "
"must also be specified."
msgstr ""
"Kapat itinakda ang mababago_ang_hudyat, dapat ding tukuyin ang katangian ng "
"hudyat at pagkokodigo_ng_hudyat."

#. TRANS: Instructions for LDAP authentication.
msgid "Do you have an LDAP account? Use your standard username and password."
msgstr ""
"Mayroon ka bang akawnt ng LDAP? Gamitin mo pampamantayang pangalan ng "
"tagagamit at hudyat."

#. TRANS: Plugin description.
msgid ""
"The LDAP Authentication plugin allows for StatusNet to handle authentication "
"through LDAP."
msgstr ""
"Ang pamasak na Pagpapatunay ng LDAP ay nagpapahintulot sa StatusNet na "
"panghawakan ang pagpapatunay sa pamamagitan ng LDAP."


code:
# Translation of StatusNet - LdapAuthentication to Ukrainian (українська)
# Exported from translatewiki.net
#
# Author: Boogie
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - LdapAuthentication\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:08:57+0000\n"
"Language-Team: Ukrainian <https://translatewiki.net/wiki/Portal:uk>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:50:24+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: uk\n"
"X-Message-Group: #out-statusnet-plugin-ldapauthentication\n"
"Plural-Forms: nplurals=3; plural=(n%10 == 1 && n%100 != 11) ? 0 : ( (n%10 >= "
"2 && n%10 <= 4 && (n%100 < 10 || n%100 >= 20)) ? 1 : 2 );\n"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid "You must specify a nickname attribute."
msgstr "Необхідно вказати атрибут псевдоніму."

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid ""
"If password_changeable is set, the password attribute and password_encoding "
"must also be specified."
msgstr ""
"Якщо password_changeable встановлено, то атрибути password і "
"password_encoding повинні також бути вказані."

#. TRANS: Instructions for LDAP authentication.
msgid "Do you have an LDAP account? Use your standard username and password."
msgstr ""
"У вас є обліковий запис LDAP? Використовуйте свої звичні ім’я користувача і "
"пароль."

#. TRANS: Plugin description.
msgid ""
"The LDAP Authentication plugin allows for StatusNet to handle authentication "
"through LDAP."
msgstr ""
"Додаток автентифікації LDAP дозволяє обробляти запити автентифікації за "
"допомогою LDAP."


code:
# Translation of StatusNet - LdapAuthentication to Simplified Chinese (中文(简体))
# Exported from translatewiki.net
#
# Author: ZhengYiFeng
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - LdapAuthentication\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-04-27 12:36+0000\n"
"PO-Revision-Date: 2011-04-27 12:37:27+0000\n"
"Language-Team: Simplified Chinese <http://translatewiki.net/wiki/Portal:zh-"
"hans>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-03-24 15:25:06+0000\n"
"X-Generator: MediaWiki 1.18alpha (r87008); Translate extension (2011-04-26)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: zh-hans\n"
"X-Message-Group: #out-statusnet-plugin-ldapauthentication\n"
"Plural-Forms: nplurals=1; plural=0;\n"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid "You must specify a nickname attribute."
msgstr ""

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid ""
"If password_changeable is set, the password attribute and password_encoding "
"must also be specified."
msgstr ""

#. TRANS: Instructions for LDAP authentication.
msgid "Do you have an LDAP account? Use your standard username and password."
msgstr ""

#. TRANS: Plugin description.
msgid ""
"The LDAP Authentication plugin allows for StatusNet to handle authentication "
"through LDAP."
msgstr "LDAP 验证插件允许 StatusNet 通过 LDAP 处理验证。"


code:
<?php
/**
 * StatusNet, the distributed open-source microblogging tool
 *
 * Plugin to enable LDAP Authorization
 *
 * PHP version 5
 *
 * LICENCE: This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @category  Plugin
 * @package   StatusNet
 * @author    Craig Andrews <candrews@integralblue.com>
 * @copyright 2009 Free Software Foundation, Inc http://www.fsf.org
 * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
 * @link      http://status.net/
 */

if (!defined('STATUSNET') && !defined('LACONICA')) {
    exit(1);
}

class LdapAuthorizationPlugin extends AuthorizationPlugin
{
    public $roles_to_groups = array();
    public $login_group = null;

    function onInitializePlugin(){
        if(!isset($this->provider_name)){
            // TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
            throw new Exception(_m('provider_name must be set. Use the provider_name from the LDAP Authentication plugin.'));
        }
        if(!isset($this->uniqueMember_attribute)){
            // TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
            throw new Exception(_m('uniqueMember_attribute must be set.'));
        }
        $this->ldapCommon = new LdapCommon(get_object_vars($this));
    }

    function onAutoload($cls)
    {
        switch ($cls)
        {
         case 'LdapCommon':
            require_once(INSTALLDIR.'/plugins/LdapCommon/LdapCommon.php');
            return false;
        }

        return parent::onAutoload($cls);
    }

    //---interface implementation---//
    function loginAllowed($user) {
        $user_username = new User_username();
        $user_username->user_id=$user->id;
        $user_username->provider_name=$this->provider_name;
        if($user_username->find() && $user_username->fetch()){
            $entry = $this->ldapCommon->get_user($user_username->username);
            if($entry){
                if(isset($this->login_group)){
                    if(is_array($this->login_group)){
                        foreach($this->login_group as $group){
                            if($this->ldapCommon->is_dn_member_of_group($entry->dn(),$group)){
                                return true;
                            }
                        }
                    }else{
                        if($this->ldapCommon->is_dn_member_of_group($entry->dn(),$this->login_group)){
                            return true;
                        }
                    }
                    return null;
                }else{
                    //if a user exists, we can assume he's allowed to login
                    return true;
                }
            }else{
                return null;
            }
        }else{
            return null;
        }
    }

    function hasRole($profile, $name) {
        $user_username = new User_username();
        $user_username->user_id=$profile->id;
        $user_username->provider_name=$this->provider_name;
        if($user_username->find() && $user_username->fetch()){
            $entry = $this->ldapCommon->get_user($user_username->username);
            if($entry){
                if(isset($this->roles_to_groups[$name])){
                    if(is_array($this->roles_to_groups[$name])){
                        foreach($this->roles_to_groups[$name] as $group){
                            if($this->ldapCommon->is_dn_member_of_group($entry->dn(),$group)){
                                return true;
                            }
                        }
                    }else{
                        if($this->ldapCommon->is_dn_member_of_group($entry->dn(),$this->roles_to_groups[$name])){
                            return true;
                        }
                    }
                }
            }
        }
        return false;
    }

    function onPluginVersion(&$versions)
    {
        $versions[] = array('name' => 'LDAP Authorization',
                            'version' => GNUSOCIAL_VERSION,
                            'author' => 'Craig Andrews',
                            'homepage' => 'http://status.net/wiki/Plugin:LdapAuthorization',
                            'rawdescription' =>
                            // TRANS: Plugin description.
                            _m('The LDAP Authorization plugin allows for StatusNet to handle authorization through LDAP.'));
        return true;
    }
}


code:
The LDAP Authorization plugin allows for StatusNet to handle authorization
through LDAP.

Installation
============
add "addPlugin('ldapAuthorization',
    array('setting'=>'value', 'setting2'=>'value2', ...);"
to the bottom of your config.php

You *cannot* use this plugin without the LDAP Authentication plugin

Settings
========
provider_name*: This is a identifier designated to the connection.
    It's how StatusNet will refer to the authentication source.
    For the most part, any name can be used, so long as each authentication
    source has a different identifier. In most cases there will be only one
    authentication source used.
authoritative (false): should this plugin be authoritative for
    authorization?
uniqueMember_attribute ('uniqueMember')*: the attribute of a group
    that lists the DNs of its members
roles_to_groups: array that maps StatusNet roles to LDAP groups
    some StatusNet roles are: moderator, administrator, sandboxed, silenced
login_group: if this is set to a group DN, only members of that group will be
    allowed to login

The below settings must be exact copies of the settings used for the
    corresponding LDAP Authentication plugin.

host*: LDAP server name to connect to. You can provide several hosts in an
    array in which case the hosts are tried from left to right.
    See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
port: Port on the server.
    See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
version: LDAP version.
    See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
starttls: TLS is started after connecting.
    See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
binddn: The distinguished name to bind as (username).
    See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
bindpw: Password for the binddn.
    See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
basedn*: LDAP base name (root directory).
    See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
options: See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
filter: Default search filter.
    See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
scope: Default search scope.
    See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php

attributes: an array that relates StatusNet user attributes to LDAP ones
    username*: LDAP attribute value entered when authenticating to StatusNet

* required
default values are in (parenthesis)

Example
=======
Here's an example of an LDAP plugin configuration that connects to
    Microsoft Active Directory.

addPlugin('ldapAuthentication', array(
    'provider_name'=>'Example',
    'authoritative'=>true,
    'autoregistration'=>true,
    'binddn'=>'username',
    'bindpw'=>'password',
    'basedn'=>'OU=Users,OU=StatusNet,OU=US,DC=americas,DC=global,DC=loc',
    'host'=>array('server1', 'server2'),
    'password_encoding'=>'ad',
    'attributes'=>array(
        'username'=>'sAMAccountName',
        'nickname'=>'sAMAccountName',
        'email'=>'mail',
        'fullname'=>'displayName',
        'password'=>'unicodePwd')
));
addPlugin('ldapAuthorization', array(
    'provider_name'=>'Example',
    'authoritative'=>false,
    'uniqueMember_attribute'=>'member',
    'roles_to_groups'=> array(
        'moderator'=>'CN=SN-Moderators,OU=Users,OU=StatusNet,OU=US,DC=americas,DC=global,DC=loc',
        'administrator'=> array('CN=System-Adminstrators,OU=Users,OU=StatusNet,OU=US,DC=americas,DC=global,DC=loc',
                                'CN=SN-Administrators,OU=Users,OU=StatusNet,OU=US,DC=americas,DC=global,DC=loc')
        ),
    'binddn'=>'username',
    'bindpw'=>'password',
    'basedn'=>'OU=Users,OU=StatusNet,OU=US,DC=americas,DC=global,DC=loc',
    'host'=>array('server1', 'server2'),
    'attributes'=>array(
        'username'=>'sAMAccountName')
));

path: plugins/LdapAuthorization/README


code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
#: LdapAuthorizationPlugin.php:42
msgid ""
"provider_name must be set. Use the provider_name from the LDAP "
"Authentication plugin."
msgstr ""

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
#: LdapAuthorizationPlugin.php:46
msgid "uniqueMember_attribute must be set."
msgstr ""

#. TRANS: Plugin description.
#: LdapAuthorizationPlugin.php:127
msgid ""
"The LDAP Authorization plugin allows for StatusNet to handle authorization "
"through LDAP."
msgstr ""


code:
# Translation of StatusNet - LdapAuthorization to German (Deutsch)
# Exported from translatewiki.net
#
# Author: Fujnky
# Author: MF-Warburg
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - LdapAuthorization\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:08:57+0000\n"
"Language-Team: German <https://translatewiki.net/wiki/Portal:de>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:50:25+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: de\n"
"X-Message-Group: #out-statusnet-plugin-ldapauthorization\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid ""
"provider_name must be set. Use the provider_name from the LDAP "
"Authentication plugin."
msgstr ""
"Der „provider_name“ muss eingestellt werden. Verwende den „provider_name“ "
"aus dem LDAP-Authentifizierungsplugin."

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid "uniqueMember_attribute must be set."
msgstr "Der Parameter „uniqueMember_attribute“ muss eingestellt werden."

#. TRANS: Plugin description.
msgid ""
"The LDAP Authorization plugin allows for StatusNet to handle authorization "
"through LDAP."
msgstr ""
"Das LDAP-Berechtigungs-Plugin erlaubt es StatusNet, Berechtigungen durch "
"LDAP abzuwickeln."


code:
# Translation of StatusNet - LdapAuthorization to Spanish (español)
# Exported from translatewiki.net
#
# Author: Armando-Martin
# Author: Translationista
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - LdapAuthorization\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:08:57+0000\n"
"Language-Team: Spanish <http://translatewiki.net/wiki/Portal:es>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:50:25+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: es\n"
"X-Message-Group: #out-statusnet-plugin-ldapauthorization\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid ""
"provider_name must be set. Use the provider_name from the LDAP "
"Authentication plugin."
msgstr ""
"Debe definir el atributo provider_name. Utilice provider_name desde el "
"complemento (plugin) de autenticación LDAP."

#. TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
msgid "uniqueMember_attribute must be set."
msgstr "Debe definir el atributo uniqueMember_attribute."

#. TRANS: Plugin description.
msgid ""
"The LDAP Authorization plugin allows for StatusNet to handle authorization "
"through LDAP."
msgstr ""
"La extensión de Autorización LDAP permite a StatusNet para manejar la "
"autorización a través de LDAP."