
# authentication using external services

*Any contributions appreciated for other authentication methods\!*


#### NIS authentication:

Configuration file example:

```
      <extension findlib-package="ocsimore.user.nis"/>
```

#### LDAP authentication:

Configuration file example:

```
      <extension findlib-package="ldap"/>
      <extension findlib-package="ocsimore.user.ldap">
        <ldap base="ou=blah,ou=users,dc=blih,dc=plop,dc=fr" uri="ldaps://my-ldap-server.com:636/" />
      </extension>
```

#### PAM authentication:

Configuration file example:

```
      <extension findlib-package="pam"/>
      <extension findlib-package="ocsimore.user.pam">
        <pam service="ocsimore" />
      </extension>
```
Here the service name must correspond to a file in `/etc/pam.d`.

*Warning:* It is not possible (for now) to use authentication based on `/etc/shadow` (using pam\_unix), because Ocsigen does not have read access to this file (would be dangerous to give access to that file to a web server).

*Warning:* The PAM authentication relies on ocamlpam binding, which is known to be buggy. It causes crashes (at least in version 1\.1).
