Custom principal implementation.