class ExternalMechanism extends AbstractMechanism {

    @Override
    public boolean isApplicable(String username, String password, Principal localPrincipal) {
        return localPrincipal != null;
    }

}