Perforce supports two primary means of authenticating users. First, it has its own user database and can provide standalone authentication. Second, it can use an external authentication system for password verification, still requiring that users run a login command.
Perforce also has a framework for single sign-on (SSO). In this framework, a user still runs a login command, but a client-side program fetches an authentication token rather than having the user actually type a password. Another program on the Perforce server verifies the token.
This project is a simple implementation of Perforce SSO using Microsoft Active Directory. The code uses Java Kerberos libraries for cross-platform ticket handling.
The instructions document provides implementation and deployment notes. You can download the PDF, or check in the same directory in the source tree for the Word and Visio sources.
The source is freely available. The source contains a standard Perforce disclaimer and copyright. Some of the Kerberos framework is governed by the Apache license, which is also in the source section.