AuthKit is a Java library created by Greg Guerin to provide a Java API to the macOS Authorization Services. It allows a Java application to run programs as root after the user authenticates as an administrator.
The original version of this library is obsolete and its hosting site is no longer available. This repo contains a copy of the AuthKit library sources, updated for more recent versions of Java and macOS. The major change is to use 64 bit integers to represent native pointers in the JNI interfaces.
AuthKit uses an Authentication Services API that has been deprecated for a long time, although as of macOS 10.12 (Sierra), it still is usable. This API was deprecated because it is too easy to create security vulnerabilities using it. Any use of the AuthKit library is at your own risk.
See the Apple documentation for information about the recommended techniques.
An ant build script is provided. It builds a JAR file and a JNI dynamic library in the JARs subdirectory.
AuthKit has been built using JDK 8 and tested on macOS 10.12 (Sierra).
The tests described in the original documentation are out of date. Read the document to understand what the tests do and what the expected output should be, but use the updated command snippets instead.
- License - The license that governs the use of this software
- Documentation - The original documentation
- API - The original API documentation
- Sources - Information about the sources